diff --git a/src/Config.cpp b/src/Config.cpp index 3db45397..d209b1bb 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -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: diff --git a/src/Config.h b/src/Config.h index 1c1f338f..fb4c42fa 100644 --- a/src/Config.h +++ b/src/Config.h @@ -220,6 +220,7 @@ struct Config hkTexDump = 0, hkHdTexReload, hkHdTexToggle, + hkTexCoordBounds, hkVsync, hkFBEmulation, hkN64DepthCompare, diff --git a/src/GLideNUI/ConfigDialog.cpp b/src/GLideNUI/ConfigDialog.cpp index db098388..230f08d6 100644 --- a/src/GLideNUI/ConfigDialog.cpp +++ b/src/GLideNUI/ConfigDialog.cpp @@ -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: diff --git a/src/VI.cpp b/src/VI.cpp index fbc019a4..cb3597a2 100644 --- a/src/VI.cpp +++ b/src/VI.cpp @@ -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; diff --git a/src/mupenplus/Config_mupenplus.cpp b/src/mupenplus/Config_mupenplus.cpp index 1de72a97..16e313ff 100644 --- a/src/mupenplus/Config_mupenplus.cpp +++ b/src/mupenplus/Config_mupenplus.cpp @@ -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: