3030#include " libretro.h"
3131
3232#include " ../../src/gearboy.h"
33+ #include " libretro_core_options.h"
3334
3435#define VIDEO_WIDTH 160
3536#define VIDEO_HEIGHT 144
@@ -57,6 +58,7 @@ static bool bootrom_dmg = false;
5758static bool bootrom_gbc = false ;
5859static bool color_correction = true ;
5960static bool libretro_supports_bitmasks;
61+ static bool categories_supported = false ;
6062
6163static void fallback_log (enum retro_log_level level, const char *fmt, ...)
6264{
@@ -72,18 +74,6 @@ static Cartridge::CartridgeTypes mapper = Cartridge::CartridgeNotSupported;
7274
7375static retro_environment_t environ_cb;
7476
75- static const struct retro_variable vars[] = {
76- { " gearboy_model" , " Game Boy Model (restart); Auto|Game Boy DMG|Game Boy Advance" },
77- { " gearboy_mapper" , " Mapper (restart); Auto|ROM Only|MBC 1|MBC 2|MBC 3|MBC 5|MBC 1 Multicart" },
78- { " gearboy_palette" , " DMG Palette; Original|Sharp|B/W|Autumn|Soft|Slime" },
79- { " gearboy_color_correction" , " GBC Color Correction; Disabled|Enabled" },
80- { " gearboy_bootrom_dmg" , " DMG Bootrom (restart); Disabled|Enabled" },
81- { " gearboy_bootrom_gbc" , " GBC Bootrom (restart); Disabled|Enabled" },
82- { " gearboy_up_down_allowed" , " Allow Up+Down / Left+Right; Disabled|Enabled" },
83-
84- { NULL }
85- };
86-
8777// red, green, blue
8878static GB_Color original_palette[4 ] = {{0x87 , 0x96 , 0x03 },{0x4D , 0x6B , 0x03 },{0x2B , 0x55 , 0x03 },{0x14 , 0x44 , 0x03 }};
8979static GB_Color sharp_palette[4 ] = {{0xF5 , 0xFA , 0xEF },{0x86 , 0xC2 , 0x70 },{0x2F , 0x69 , 0x57 },{0x0B , 0x19 , 0x20 }};
@@ -182,7 +172,7 @@ void retro_set_environment(retro_environment_t cb)
182172
183173 cb (RETRO_ENVIRONMENT_SET_CONTROLLER_INFO , (void *)ports);
184174
185- environ_cb ( RETRO_ENVIRONMENT_SET_VARIABLES , ( void *)vars );
175+ libretro_set_core_options (environ_cb, &categories_supported );
186176}
187177
188178void retro_set_audio_sample (retro_audio_sample_t cb)
0 commit comments