1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00

Add hotkey for "EnableTexCoordBounds" setting.

This commit is contained in:
Sergey Lipskiy 2021-04-11 11:05:34 +07:00
parent e70c9bfcd7
commit 370e57b131
5 changed files with 14 additions and 0 deletions

View File

@ -174,6 +174,8 @@ const char* Config::hotkeyIniName(u32 _idx)
return "hkHdTexReload";
case Config::HotKey::hkHdTexToggle:
return "hkHdTexToggle";
case Config::HotKey::hkTexCoordBounds:
return "hkTexCoordBounds";
case Config::HotKey::hkVsync:
return "hkVsync";
case Config::HotKey::hkFBEmulation:

View File

@ -220,6 +220,7 @@ struct Config
hkTexDump = 0,
hkHdTexReload,
hkHdTexToggle,
hkTexCoordBounds,
hkVsync,
hkFBEmulation,
hkN64DepthCompare,

View File

@ -80,6 +80,8 @@ QString ConfigDialog::_hotkeyDescription(quint32 _idx) const
return tr("Reload HD textures");
case Config::HotKey::hkHdTexToggle:
return tr("Toggle HD textures");
case Config::HotKey::hkTexCoordBounds:
return tr("Toggle texcoords bounds");
case Config::HotKey::hkVsync:
return tr("Toggle VSync");
case Config::HotKey::hkFBEmulation:

View File

@ -130,6 +130,13 @@ static void checkHotkeys()
textureCache().toggleDumpTex();
}
if (osal_is_key_pressed(config.hotkeys.keys[Config::hkTexCoordBounds], 0x0001)) {
if (config.graphics2D.enableTexCoordBounds == 0)
dwnd().getDrawer().showMessage("Bound texrect texture coordinates on\n", Milliseconds(1000));
else
dwnd().getDrawer().showMessage("Bound texrect texture coordinates off\n", Milliseconds(1000));
config.graphics2D.enableTexCoordBounds = !config.graphics2D.enableTexCoordBounds;
}
if (osal_is_key_pressed(config.hotkeys.keys[Config::hkVsync], 0x0001)) {
config.video.verticalSync = !config.video.verticalSync;

View File

@ -29,6 +29,8 @@ const char* _hotkeyDescription(u32 _idx)
return "Hotkey: reload HD textures";
case Config::HotKey::hkHdTexToggle:
return "Hotkey: toggle HD textures";
case Config::HotKey::hkTexCoordBounds:
return "Hotkey: toggle texcoords bounds";
case Config::HotKey::hkVsync:
return "Hotkey: toggle VSync";
case Config::HotKey::hkFBEmulation: