fix: compilation error seen in #234

This commit is contained in:
Kainoa Kanter 2024-07-04 17:15:56 -07:00 committed by GitHub
parent 3f123bbce2
commit 82b623058e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -130,7 +130,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
case SDLK_RETURN: case SDLK_RETURN:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_OPTIONS; button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_OPTIONS;
break; break;
case SDLK_a: case SDLK_A:
axis = Input::Axis::LeftX; axis = Input::Axis::LeftX;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += -127; axisvalue += -127;
@ -139,7 +139,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_d: case SDLK_D:
axis = Input::Axis::LeftX; axis = Input::Axis::LeftX;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += 127; axisvalue += 127;
@ -148,7 +148,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_w: case SDLK_W:
axis = Input::Axis::LeftY; axis = Input::Axis::LeftY;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += -127; axisvalue += -127;
@ -157,7 +157,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_s: case SDLK_S:
axis = Input::Axis::LeftY; axis = Input::Axis::LeftY;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += 127; axisvalue += 127;
@ -166,7 +166,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_j: case SDLK_J:
axis = Input::Axis::RightX; axis = Input::Axis::RightX;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += -127; axisvalue += -127;
@ -175,7 +175,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_l: case SDLK_L:
axis = Input::Axis::RightX; axis = Input::Axis::RightX;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += 127; axisvalue += 127;
@ -184,7 +184,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_i: case SDLK_I:
axis = Input::Axis::RightY; axis = Input::Axis::RightY;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += -127; axisvalue += -127;
@ -193,7 +193,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_k: case SDLK_K:
axis = Input::Axis::RightY; axis = Input::Axis::RightY;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
axisvalue += 127; axisvalue += 127;
@ -202,19 +202,19 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(-0x80, 0x80, axisvalue); ax = Input::GetAxis(-0x80, 0x80, axisvalue);
break; break;
case SDLK_x: case SDLK_X:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L3; button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L3;
break; break;
case SDLK_m: case SDLK_M:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R3; button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R3;
break; break;
case SDLK_q: case SDLK_Q:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L1; button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L1;
break; break;
case SDLK_u: case SDLK_U:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R1; button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R1;
break; break;
case SDLK_e: case SDLK_E:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L2; button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_L2;
axis = Input::Axis::TriggerLeft; axis = Input::Axis::TriggerLeft;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {
@ -224,7 +224,7 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
} }
ax = Input::GetAxis(0, 0x80, axisvalue); ax = Input::GetAxis(0, 0x80, axisvalue);
break; break;
case SDLK_o: case SDLK_O:
button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R2; button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_R2;
axis = Input::Axis::TriggerRight; axis = Input::Axis::TriggerRight;
if (event->type == SDL_EVENT_KEY_DOWN) { if (event->type == SDL_EVENT_KEY_DOWN) {