X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fuiq3%2Femu.c;h=22b21431de269c6c1d6abcc969153c342a099a95;hb=39e5b215d39aad4edbb56b05a80c572197728614;hp=71bf872e336900aaa42f3bcce2d125af85255261;hpb=ca482e5de8bacb70db55f43afe02f93fe6fe3f16;p=picodrive.git diff --git a/platform/uiq3/emu.c b/platform/uiq3/emu.c index 71bf872..22b2143 100644 --- a/platform/uiq3/emu.c +++ b/platform/uiq3/emu.c @@ -4,7 +4,7 @@ #include "../common/emu.h" #include "../common/config.h" #include "../common/menu.h" -#include "Pico/PicoInt.h" +#include "pico/pico_int.h" const char * const keyNames[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -13,7 +13,7 @@ const char * const keyNames[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; -int emu_getMainDir(char *dst, int len) +int plat_get_root_dir(char *dst, int len) { strcpy(dst, "D:\\other\\PicoDrive\\"); return strlen(dst); @@ -34,7 +34,7 @@ void emu_Init(void) emu_prepareDefaultConfig(); config_readlrom("D:\\other\\PicoDrive\\config.cfg"); - emu_ReadConfig(0, 0); + emu_read_config(0, 0); //PicoInit(); } @@ -65,6 +65,25 @@ void emu_prepareDefaultConfig(void) defaultConfig.Frameskip = -1; // auto defaultConfig.volume = 80; defaultConfig.scaling = 0; + defaultConfig.KeyBinds[0xd5] = 1<<26; // back +} + +void emu_pack_config(void) +{ + currentConfig.s_PicoOpt = PicoOpt; + currentConfig.s_PsndRate = PsndRate; + currentConfig.s_PicoRegion = PicoRegionOverride; + currentConfig.s_PicoAutoRgnOrder = PicoAutoRgnOrder; + currentConfig.s_PicoCDBuffers = PicoCDBuffers; +} + +void emu_unpack_config(void) +{ + PicoOpt = currentConfig.s_PicoOpt; + PsndRate = currentConfig.s_PsndRate; + PicoRegionOverride = currentConfig.s_PicoRegion; + PicoAutoRgnOrder = currentConfig.s_PicoAutoRgnOrder; + PicoCDBuffers = currentConfig.s_PicoCDBuffers; } /* used by config engine only, not actual menus */ @@ -102,7 +121,7 @@ const int opt2_entry_count = OPT2_ENTRY_COUNT; menu_entry cdopt_entries[] = { { "CD LEDs", MB_ONOFF, MA_CDOPT_LEDS, ¤tConfig.EmuOpt, 0x0400, 0, 0, 1, 1 }, - { "CDDA audio (using mp3s)", MB_ONOFF, MA_CDOPT_CDDA, &PicoOpt, 0x0800, 0, 0, 1, 1 }, + { "CDDA audio", MB_ONOFF, MA_CDOPT_CDDA, &PicoOpt, 0x0800, 0, 0, 1, 1 }, { "PCM audio", MB_ONOFF, MA_CDOPT_PCM, &PicoOpt, 0x0400, 0, 0, 1, 1 }, { NULL, MB_NONE, MA_CDOPT_READAHEAD, NULL, 0, 0, 0, 1, 1 }, { "SaveRAM cart", MB_ONOFF, MA_CDOPT_SAVERAM, &PicoOpt, 0x8000, 0, 0, 1, 1 },