Big Settings Update

This commit is contained in:
skymz4 2022-04-25 17:29:40 +02:00 committed by GitHub
parent 8f80a99fc6
commit 3231bc8240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -28,6 +28,7 @@ u8 consoleModel = 0;
u8 sysRegion = CFG_REGION_USA;
bool is_citra = false;
//---------------------------------------
bool rd7settings = false;
std::string D_app_name;
@ -803,7 +804,7 @@ void RenderD7::DrawTLBtns(std::vector<RenderD7::TLBtn> btns, u32 color, int sele
void RenderD7::ExitApp()
{
running = false;
if (!rd7settings) running = false;
}
bool RenderD7::touchTObj(touchPosition touch, RenderD7::TObject button)
@ -1195,6 +1196,7 @@ RenderD7::RSettings::RSettings()
{
cfgfile = std::make_unique<INI::INIFile>(cfgpath+ "/config.ini");
cfgfile->read(cfgstruct);
rd7settings = true;
}
RenderD7::RSettings::~RSettings()
@ -1274,9 +1276,15 @@ void RenderD7::RSettings::Logic(u32 hDown, u32 hHeld, u32 hUp, touchPosition tou
{
cfgstruct["settings"]["forceFrameRate"] = Kbd(2, SWKBD_TYPE_NUMPAD);
}
if (d7_hDown & KEY_TOUCH && RenderD7::touchTObj(d7_touch, buttons[4]))
{
mt_screen = mt_screen ? 0 : 1;
cfgstruct["settings"]["forceFrameRate"] = mt_screen ? "1" : "0";
}
if (d7_hDown & KEY_B)
{
cfgfile->write(cfgstruct);
rd7settings = false;
RenderD7::Scene::Back();
}

View File

@ -179,7 +179,7 @@ namespace RenderD7
{20, 85, 120, 35, "MT_CSV", -15, 9},
{20, 135, 120, 35, "MT_OVL", -19, 10},
{20, 185, 120, 35, "FPS", 6, 10},
{180, 35, 120, 35, "MTSCREEN", -10, 10},
{180, 35, 120, 35, "MTSCREEN", -17, 10},
{180, 85, 120, 35, "", -13, 10},
{180, 135, 120, 35, "", 2, 10},
{180, 185, 120, 35, "", -13, 10}