Skip to content

Commit

Permalink
* Win32: Don't close app if texture missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
iProgramMC committed Apr 19, 2024
1 parent fefcf95 commit b18af84
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions platforms/windows/AppPlatform_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,13 @@ Texture AppPlatform_win32::loadTexture(const std::string& str, bool bIsRequired)
if (!bIsRequired)
return Texture(0, 0, nullptr, 1, 0);

const std::string msg = "Error loading " + realPath + ". Did you unzip the Minecraft assets?";
MessageBoxA(GetHWND(), msg.c_str(), getWindowTitle(), MB_OK);
const std::string msg = "Error loading " + realPath + ". Did you unzip the Minecraft assets?\n\nNote, you will be warned for every missing texture.";
MessageBoxA(GetHWND(), msg.c_str(), getWindowTitle(), MB_OK | MB_ICONERROR);

if (f)
fclose(f);
::exit(1);

return Texture(0, 0, nullptr, 0, 0);
}

int width = 0, height = 0, channels = 0;
Expand Down

0 comments on commit b18af84

Please sign in to comment.