Correct tab usage

This commit is contained in:
Phillip Stephens 2022-03-22 10:54:58 -07:00
parent 64e662069d
commit ec430567c3
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
5 changed files with 37 additions and 35 deletions

View File

@ -617,7 +617,7 @@ void CNESEmulator::ProcessUserInput(const CFinalInput& input, int) {
inValReads[BUTTON_DOWN] = input.DDPDown() || input.DLADown(); inValReads[BUTTON_DOWN] = input.DDPDown() || input.DLADown();
inValReads[BUTTON_LEFT] = input.DDPLeft() || input.DLALeft(); inValReads[BUTTON_LEFT] = input.DDPLeft() || input.DLALeft();
inValReads[BUTTON_RIGHT] = input.DDPRight() || input.DLARight(); inValReads[BUTTON_RIGHT] = input.DDPRight() || input.DLARight();
inValReads[BUTTON_SELECT] = input.DZ() || input.DKey('\t'); inValReads[BUTTON_SELECT] = input.DZ() || input.DSpecialKey(aurora::SpecialKey::Tab);
inValReads[BUTTON_START] = input.DStart() || input.DSpecialKey(aurora::SpecialKey::Esc); inValReads[BUTTON_START] = input.DStart() || input.DSpecialKey(aurora::SpecialKey::Esc);
} }

View File

@ -662,8 +662,7 @@ void CAutoMapper::ProcessMapPanInput(const CFinalInput& input, const CStateManag
bool mouseHeld = false; bool mouseHeld = false;
if (const auto& kbm = input.GetKBM()) { if (const auto& kbm = input.GetKBM()) {
if (kbm->m_mouseButtons[size_t(EMouseButton::Middle)] || if (kbm->m_mouseButtons[size_t(EMouseButton::Middle)] || kbm->m_mouseButtons[size_t(EMouseButton::Secondary)]) {
kbm->m_mouseButtons[size_t(EMouseButton::Secondary)]) {
mouseHeld = true; mouseHeld = true;
if (float(m_mouseDelta.x()) < 0.f) if (float(m_mouseDelta.x()) < 0.f)
right += -m_mouseDelta.x(); right += -m_mouseDelta.x();
@ -1084,7 +1083,8 @@ void CAutoMapper::ProcessControllerInput(const CFinalInput& input, CStateManager
} }
} }
if (input.PZ() || input.PKey('\t') || input.PB() || input.PSpecialKey(aurora::SpecialKey::Esc)) { if (input.PZ() || input.PSpecialKey(aurora::SpecialKey::Tab) || input.PB() ||
input.PSpecialKey(aurora::SpecialKey::Esc)) {
if (x328_ == 0) { if (x328_ == 0) {
if (CanLeaveMapScreenInternal(mgr)) { if (CanLeaveMapScreenInternal(mgr)) {
LeaveMapScreen(mgr); LeaveMapScreen(mgr);

View File

@ -981,7 +981,7 @@ CFrontEndUI::SFusionBonusFrame::EAction CFrontEndUI::SFusionBonusFrame::ProcessU
} }
} else if (x24_loadedFrame) { } else if (x24_loadedFrame) {
CFinalInput useInput = input; CFinalInput useInput = input;
if (input.PZ() || input.PKey('\t')) { if (input.PZ() || input.PSpecialKey(aurora::SpecialKey::Tab)) {
useInput.x2d_b28_PA = true; useInput.x2d_b28_PA = true;
m_gbaOverride = true; m_gbaOverride = true;
} }

View File

@ -134,7 +134,8 @@ CIOWin::EMessageReturn CMFGame::OnMessage(const CArchitectureMessage& msg, CArch
} else if (!cineCam) { } else if (!cineCam) {
x14_stateManager->DeferStateTransition(EStateManagerTransition::PauseGame); x14_stateManager->DeferStateTransition(EStateManagerTransition::PauseGame);
} }
} else if ((input.PZ() || input.PKey('\t')) && !cineCam && x14_stateManager->CanShowMapScreen()) { } else if ((input.PZ() || input.PSpecialKey(aurora::SpecialKey::Tab)) && !cineCam &&
x14_stateManager->CanShowMapScreen()) {
x14_stateManager->DeferStateTransition(EStateManagerTransition::MapScreen); x14_stateManager->DeferStateTransition(EStateManagerTransition::MapScreen);
} }
} }
@ -347,8 +348,8 @@ CIOWin::EMessageReturn CMFGameLoader::OnMessage(const CArchitectureMessage& msg,
x1c_loadList.clear(); x1c_loadList.clear();
// if (!CGraphics::g_BooFactory->areShadersReady()) // if (!CGraphics::g_BooFactory->areShadersReady())
// return EMessageReturn::Exit; // return EMessageReturn::Exit;
wtMgr->StartTextFadeOut(); wtMgr->StartTextFadeOut();
x2c_25_transitionFinished = wtMgr->IsTransitionFinished(); x2c_25_transitionFinished = wtMgr->IsTransitionFinished();

View File

@ -93,32 +93,32 @@ enum class SpecialKey : uint8_t {
KpEnter = 47, KpEnter = 47,
KpNum0 = 48, KpNum0 = 48,
KpNum1 = 49, KpNum1 = 49,
KpNum2 = 51, KpNum2 = 50,
KpNum3 = 52, KpNum3 = 51,
KpNum4 = 53, KpNum4 = 52,
KpNum5 = 54, KpNum5 = 53,
KpNum6 = 55, KpNum6 = 54,
KpNum7 = 56, KpNum7 = 55,
KpNum8 = 57, KpNum8 = 56,
KpNum9 = 58, KpNum9 = 57,
KpPercent = 59, KpPercent = 58,
KpPeriod = 60, KpPeriod = 59,
KpComma = 61, KpComma = 60,
KpEquals = 62, KpEquals = 61,
Application = 63, Application = 62,
Power = 64, Power = 63,
Execute = 65, Execute = 64,
Help = 66, Help = 65,
Menu = 67, Menu = 66,
Select = 68, Select = 67,
Stop = 69, Stop = 68,
Again = 70, Again = 69,
Undo = 71, Undo = 70,
Cut = 72, Cut = 71,
Paste = 73, Paste = 72,
Find = 74, Find = 73,
VolumeUp = 75, VolumeUp = 74,
VolumeDown = 76, VolumeDown = 75,
MAX, MAX,
}; };
enum class ModifierKey : uint16_t { enum class ModifierKey : uint16_t {
@ -253,6 +253,7 @@ void set_fullscreen(bool fullscreen) noexcept;
void set_controller_player_index(uint32_t which, int32_t index) noexcept; void set_controller_player_index(uint32_t which, int32_t index) noexcept;
[[nodiscard]] bool is_controller_gamecube(uint32_t which) noexcept; [[nodiscard]] bool is_controller_gamecube(uint32_t which) noexcept;
[[nodiscard]] bool controller_has_rumble(uint32_t which) noexcept; [[nodiscard]] bool controller_has_rumble(uint32_t which) noexcept;
void controller_rumble(uint32_t which, uint16_t low_freq_intensity, uint16_t high_freq_intensity, uint32_t duration_ms = 0) noexcept; void controller_rumble(uint32_t which, uint16_t low_freq_intensity, uint16_t high_freq_intensity,
uint32_t duration_ms = 0) noexcept;
[[nodiscard]] std::string get_controller_name(uint32_t which) noexcept; [[nodiscard]] std::string get_controller_name(uint32_t which) noexcept;
} // namespace aurora } // namespace aurora