1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 01:29:43 +01:00

Add SimpleMessageBox for early filesystem bail

This ensures that the game won't silently fail to start if it can't
initialize the filesystem. Instead, it will fail loudly by popping open
a message box (using SDL_ShowSimpleMessageBox).

The motivation for this comes from issue #1010 where this is likely to
occur if the user has Controlled Folder Access enabled on Windows, but I
didn't want to put in the work to specifically detect CFA (and not sure
if it's even possible if it turns out that the OS just gives a standard
"permission denied" in this case). At least any message box is better
than silently failing but printing to console when most users don't know
what a console is.

Fixes #1010.
This commit is contained in:
Misa 2023-12-31 16:54:53 -08:00
parent 76882e9a13
commit b4579d88d3

View file

@ -559,6 +559,7 @@ int main(int argc, char *argv[])
if(!FILESYSTEM_init(argv[0], baseDir, assetsPath, langDir, fontsDir))
{
vlog_error("Unable to initialize filesystem!");
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Unable to initialize filesystem!", NULL);
VVV_exit(1);
}