s32 EXPORT_CALL GetEmuSetting(u32 sid,void* value) { wchar* sptr=(wchar*)value; u32* tptr=(u32*)value; switch(sid) { _esai_(DYNAREC_ENABLED,dynarec.Enable,1); _esai_(DYNAREC_CPPASS,dynarec.CPpass,1); _esai_(DYNAREC_SAFEMODE,dynarec.Safe,1); _esai_(DYNAREC_UCFPU,dynarec.UnderclockFpu,1); _esai_(DREAMCAST_CABLE,dreamcast.cable,3); _esai_(DREAMCAST_RTC,dreamcast.RTC,0xFFFFFFFF); _esai_(DREAMCAST_REGION,dreamcast.region,3); _esai_(DREAMCAST_BROADCAST,dreamcast.broadcast,4); _esai_(EMULATOR_ASTART,emulator.AutoStart,1); default: if (sid<NDCS_COUNT) { cfgLoadStr(_T("nullDC_plugins"),ndc_snames[sid-NDCS_PLUGIN_PVR],sptr,pluginDefaults[sid-NDCS_PLUGIN_PVR]); return rv_ok; } else return rv_error; } return rv_ok; }
s32 EXPORT_CALL SetEmuSetting(u32 sid,void* value) { char* sptr=(char*)value; u32* tptr=(u32*)value; switch(sid) { _esai_(DYNAREC_ENABLED,dynarec.Enable,1); SwitchCpu();//switch cpu if needed break; _esai_(DYNAREC_CPPASS,dynarec.CPpass,1); if (sh4_cpu->ResetCache) sh4_cpu->ResetCache(); break; _esai_(DYNAREC_SAFEMODE,dynarec.Safe,1); if (sh4_cpu->ResetCache) sh4_cpu->ResetCache(); break; _esai_(DYNAREC_UCFPU,dynarec.UnderclockFpu,1); if (sh4_cpu->ResetCache) sh4_cpu->ResetCache(); break; _esai_(DREAMCAST_CABLE,dreamcast.cable,3); break; _esai_(DREAMCAST_RTC,dreamcast.RTC,0xFFFFFFFF); break; _esai_(DREAMCAST_REGION,dreamcast.region,3); break; _esai_(DREAMCAST_BROADCAST,dreamcast.broadcast,4); break; _esai_(EMULATOR_ASTART,emulator.AutoStart,1); break; default: if (sid<NDCS_COUNT) { cfgSaveStr(("nullDC_plugins"),ndc_snames[sid-NDCS_PLUGIN_PVR],sptr); return rv_ok; } else return rv_error; } return rv_ok; }