MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / cellGameContentErrorDialog

Function cellGameContentErrorDialog

ps3fw/cellGame.cpp:1942–2004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1940}
1941
1942error_code cellGameContentErrorDialog(s32 type, s32 errNeedSizeKB,
1943 vm::cptr<char> dirName)
1944{
1945 cellGame.warning(
1946 "cellGameContentErrorDialog(type=%d, errNeedSizeKB=%d, dirName=%s)", type,
1947 errNeedSizeKB, dirName);
1948
1949 std::string error_msg;
1950
1951 switch (type)
1952 {
1953 case CELL_GAME_ERRDIALOG_BROKEN_GAMEDATA:
1954 // Game data is corrupted. The application will continue.
1955 error_msg = get_localized_string(
1956 localized_string_id::CELL_GAME_ERROR_BROKEN_GAMEDATA);
1957 break;
1958 case CELL_GAME_ERRDIALOG_BROKEN_HDDGAME:
1959 // HDD boot game is corrupted. The application will continue.
1960 error_msg = get_localized_string(
1961 localized_string_id::CELL_GAME_ERROR_BROKEN_HDDGAME);
1962 break;
1963 case CELL_GAME_ERRDIALOG_NOSPACE:
1964 // Not enough available space. The application will continue.
1965 error_msg =
1966 get_localized_string(localized_string_id::CELL_GAME_ERROR_NOSPACE,
1967 fmt::format("%d", errNeedSizeKB).c_str());
1968 break;
1969 case CELL_GAME_ERRDIALOG_BROKEN_EXIT_GAMEDATA:
1970 // Game data is corrupted. The application will be terminated.
1971 error_msg = get_localized_string(
1972 localized_string_id::CELL_GAME_ERROR_BROKEN_EXIT_GAMEDATA);
1973 break;
1974 case CELL_GAME_ERRDIALOG_BROKEN_EXIT_HDDGAME:
1975 // HDD boot game is corrupted. The application will be terminated.
1976 error_msg = get_localized_string(
1977 localized_string_id::CELL_GAME_ERROR_BROKEN_EXIT_HDDGAME);
1978 break;
1979 case CELL_GAME_ERRDIALOG_NOSPACE_EXIT:
1980 // Not enough available space. The application will be terminated.
1981 error_msg =
1982 get_localized_string(localized_string_id::CELL_GAME_ERROR_NOSPACE_EXIT,
1983 fmt::format("%d", errNeedSizeKB).c_str());
1984 break;
1985 default:
1986 return CELL_GAME_ERROR_PARAM;
1987 }
1988
1989 if (dirName)
1990 {
1991 if (!memchr(dirName.get_ptr(), '\0', CELL_GAME_DIRNAME_SIZE))
1992 {
1993 return CELL_GAME_ERROR_PARAM;
1994 }
1995
1996 error_msg += '\n';
1997 error_msg +=
1998 get_localized_string(localized_string_id::CELL_GAME_ERROR_DIR_NAME,
1999 fmt::format("%s", dirName).c_str());

Callers

nothing calls this directly

Calls 5

get_localized_stringFunction · 0.85
open_exit_dialogFunction · 0.85
c_strMethod · 0.80
formatEnum · 0.50
get_ptrMethod · 0.45

Tested by

no test coverage detected