mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-30 08:24:05 +00:00
Add hotkey to toggle 2D texrects in native resolution.
This commit is contained in:
parent
370e57b131
commit
fe869cf5d2
|
@ -176,6 +176,8 @@ const char* Config::hotkeyIniName(u32 _idx)
|
|||
return "hkHdTexToggle";
|
||||
case Config::HotKey::hkTexCoordBounds:
|
||||
return "hkTexCoordBounds";
|
||||
case Config::HotKey::hkNativeResTexrects:
|
||||
return "hkNativeResTexrects";
|
||||
case Config::HotKey::hkVsync:
|
||||
return "hkVsync";
|
||||
case Config::HotKey::hkFBEmulation:
|
||||
|
|
|
@ -221,6 +221,7 @@ struct Config
|
|||
hkHdTexReload,
|
||||
hkHdTexToggle,
|
||||
hkTexCoordBounds,
|
||||
hkNativeResTexrects,
|
||||
hkVsync,
|
||||
hkFBEmulation,
|
||||
hkN64DepthCompare,
|
||||
|
|
|
@ -82,6 +82,8 @@ QString ConfigDialog::_hotkeyDescription(quint32 _idx) const
|
|||
return tr("Toggle HD textures");
|
||||
case Config::HotKey::hkTexCoordBounds:
|
||||
return tr("Toggle texcoords bounds");
|
||||
case Config::HotKey::hkNativeResTexrects:
|
||||
return tr("Toggle 2D texrects in native resolution");
|
||||
case Config::HotKey::hkVsync:
|
||||
return tr("Toggle VSync");
|
||||
case Config::HotKey::hkFBEmulation:
|
||||
|
|
14
src/VI.cpp
14
src/VI.cpp
|
@ -138,6 +138,20 @@ static void checkHotkeys()
|
|||
config.graphics2D.enableTexCoordBounds = !config.graphics2D.enableTexCoordBounds;
|
||||
}
|
||||
|
||||
if (osal_is_key_pressed(config.hotkeys.keys[Config::hkNativeResTexrects], 0x0001)) {
|
||||
static u32 s_nativeResTexrects = Config::NativeResTexrectsMode::ntOptimized;
|
||||
if (config.graphics2D.enableNativeResTexrects != Config::NativeResTexrectsMode::ntDisable) {
|
||||
s_nativeResTexrects = config.graphics2D.enableNativeResTexrects;
|
||||
config.graphics2D.enableNativeResTexrects = Config::NativeResTexrectsMode::ntDisable;
|
||||
}
|
||||
else
|
||||
config.graphics2D.enableNativeResTexrects = s_nativeResTexrects;
|
||||
if (config.graphics2D.enableNativeResTexrects == Config::NativeResTexrectsMode::ntDisable)
|
||||
dwnd().getDrawer().showMessage("Disable 2D texrects in native resolution\n", Milliseconds(1000));
|
||||
else
|
||||
dwnd().getDrawer().showMessage("Enable 2D texrects in native resolution\n", Milliseconds(1000));
|
||||
}
|
||||
|
||||
if (osal_is_key_pressed(config.hotkeys.keys[Config::hkVsync], 0x0001)) {
|
||||
config.video.verticalSync = !config.video.verticalSync;
|
||||
dwnd().stop();
|
||||
|
|
|
@ -31,6 +31,8 @@ const char* _hotkeyDescription(u32 _idx)
|
|||
return "Hotkey: toggle HD textures";
|
||||
case Config::HotKey::hkTexCoordBounds:
|
||||
return "Hotkey: toggle texcoords bounds";
|
||||
case Config::HotKey::hkNativeResTexrects:
|
||||
return "Hotkey: toggle 2D texrects in native resolution";
|
||||
case Config::HotKey::hkVsync:
|
||||
return "Hotkey: toggle VSync";
|
||||
case Config::HotKey::hkFBEmulation:
|
||||
|
|
Loading…
Reference in New Issue
Block a user