diff options
author | twinaphex | 2017-01-24 02:19:17 +0100 |
---|---|---|
committer | twinaphex | 2017-01-24 02:19:17 +0100 |
commit | f50d04d4598750e5d82426871f45b084eea01f16 (patch) | |
tree | a7b3ba2347747d637781e5b4126d4587c261911e | |
parent | 79faa3ca54b9950c0be9ef19ce3acfe4be3d4408 (diff) | |
download | snes9x2002-f50d04d4598750e5d82426871f45b084eea01f16.tar.gz snes9x2002-f50d04d4598750e5d82426871f45b084eea01f16.tar.bz2 snes9x2002-f50d04d4598750e5d82426871f45b084eea01f16.zip |
return false if game is NULL inside retro_load_game
-rw-r--r-- | libretro/libretro.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libretro/libretro.c b/libretro/libretro.c index d1d14f8..e97bcdf 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -515,8 +515,11 @@ void retro_cheat_set(unsigned index, bool enable, const char* in_code) bool retro_load_game(const struct retro_game_info *game) { bool8 loaded; - enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565; + + if (!game) + return false; + if (!environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt)) { fprintf(stderr, "[libretro]: RGB565 is not supported.\n"); |