1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-27 23:14:05 +00:00

Add inaccurate texture coordinates hotkey

This commit is contained in:
Rosalie Wanders 2022-01-31 18:54:12 +01:00 committed by Sergey Lipskiy
parent 8a0db39812
commit 4598939a90
5 changed files with 19 additions and 0 deletions

View File

@ -202,6 +202,8 @@ const char* Config::hotkeyIniName(u32 _idx)
return "hkOsdRenderingResolution";
case Config::HotKey::hkForceGammaCorrection:
return "hkForceGammaCorrection";
case Config::HotKey::hkInaccurateTexCords:
return "hkInaccurateTexCords";
}
return nullptr;
}
@ -238,6 +240,8 @@ const char* Config::enabledHotkeyIniName(u32 _idx)
return "hkOsdRenderingResolutionEnabled";
case Config::HotKey::hkForceGammaCorrection:
return "hkForceGammaCorrectionEnabled";
case Config::HotKey::hkInaccurateTexCords:
return "hkInaccurateTexCordsEnabled";
}
return nullptr;
}

View File

@ -234,6 +234,7 @@ struct Config
hkOsdInternalResolution,
hkOsdRenderingResolution,
hkForceGammaCorrection,
hkInaccurateTexCords,
hkTotal
};

View File

@ -103,6 +103,8 @@ QString ConfigDialog::_hotkeyDescription(quint32 _idx) const
return tr("Toggle OSD rendering resolution");
case Config::HotKey::hkForceGammaCorrection:
return tr("Toggle force gamma correction");
case Config::HotKey::hkInaccurateTexCords:
return tr("Toggle inaccurate texture coordinates");
}
return tr("Unknown hotkey");
}

View File

@ -216,6 +216,16 @@ static void checkHotkeys()
dwnd().getDrawer().showMessage("Force gamma correction off\n", Milliseconds(750));
config.gammaCorrection.force = !config.gammaCorrection.force;
}
if (osal_is_key_pressed(config.hotkeys.enabledKeys[Config::hkInaccurateTexCords], 0x0001)) {
config.generalEmulation.enableInaccurateTextureCoordinates = !config.generalEmulation.enableInaccurateTextureCoordinates;
dwnd().stop();
dwnd().start();
if (config.generalEmulation.enableInaccurateTextureCoordinates == 0)
dwnd().getDrawer().showMessage("Disable inaccurate texture coordinates\n", Milliseconds(1000));
else
dwnd().getDrawer().showMessage("Enable inaccurate texture coordinates\n", Milliseconds(1000));
}
}
void VI_UpdateScreen()

View File

@ -51,6 +51,8 @@ const char* _hotkeyDescription(u32 _idx)
return "Hotkey: toggle OSD rendering resolution";
case Config::HotKey::hkForceGammaCorrection:
return "Hotkey: toggle force gamma correction";
case Config::HotKey::hkInaccurateTexCords:
return "Hotkey: toggle inaccurate texture coordinates";
}
return "Unknown hotkey";
}