mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-03 12:28:10 +03:00
Reorganize initialization error reporting
- Invalid game id -> sys_error() in GameId::GameId() - Unknown crc32 -> SDL_ShowSimpleMessageBox() in GameId::GameId() - Cannot open ADISK.DAT -> sys_error() in NACT::NACT()
This commit is contained in:
@@ -31,13 +31,6 @@ SDL_Window* create_window(const GameId& game_id)
|
||||
if (game_id.title) {
|
||||
title += ": ";
|
||||
title += game_id.title;
|
||||
} else {
|
||||
SDL_ShowSimpleMessageBox(
|
||||
SDL_MESSAGEBOX_WARNING, "system3",
|
||||
"Unable to determine game ID.\n"
|
||||
"If you are running a modified game, please specify 'game = <original-game-id>' in system3.ini.\n"
|
||||
"See README.md for more information.",
|
||||
NULL);
|
||||
}
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
@@ -81,9 +74,6 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
GameId game_id(config);
|
||||
if (!game_id.is_valid()) {
|
||||
sys_error("No game files in the current directory.");
|
||||
}
|
||||
|
||||
g_window = create_window(game_id);
|
||||
g_renderer = SDL_CreateRenderer(g_window, -1, 0);
|
||||
|
||||
Reference in New Issue
Block a user