summaryrefslogtreecommitdiff
path: root/libretro/libretro.c
diff options
context:
space:
mode:
Diffstat (limited to 'libretro/libretro.c')
-rw-r--r--libretro/libretro.c5
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");