forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDL: check results of SDL functions for errors and report them.
Added the fontlist path to the debug output so the user knows where to look. Removed SDL_Init(SDL_INIT_AUDIO) as the AUDIO flag is included in the first call of SDL_Init. Removed the error logging that InitSDL or WinCreate failed. Both function already log the error when they return false. Added error reporting during loading of tileset, done by throwing. Made several functions that load tiles report their errors by throwing std::string. Delegate some of that to the Json class (when the json data is invalid). Add some documentation about what's thrown. cata_tiles::reinit: call init after clearing instead of duplicating its code. options.cpp: reinit tiles from the same folder as it was initialized in sdltiles.cpp during start. Shifted the include into the main part, no need to include the file if tiles are not enabled at all. Added reporting of SDL errors in cata_tiles with DebugLog. All errors are logged, but do not throw, throwing is only done during loading of the tileset. Also erase a compiler warning about missing switch-case.
- Loading branch information
Showing
4 changed files
with
140 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.