Skip to content

Commit 49ae193

Browse files
committed
stuff
1 parent aff8ca8 commit 49ae193

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/ruisapp/glue/sdl/glue.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ const std::array<ruis::key, utki::byte_mask + 1> key_map = {
310310
}
311311
};
312312

313-
ruis::key sdl_scan_code_to_ruis_key(SDL_Scancode sc)
313+
ruis::key sdl_scancode_to_ruis_key(SDL_Scancode sc)
314314
{
315315
if (size_t(sc) >= key_map.size()) {
316316
return ruis::key::unknown;
@@ -626,11 +626,12 @@ void main_loop_iteration(void* user_data)
626626
// - wait for events and handle them/next cycle
627627

628628
auto to_wait_ms = app->gui.update();
629-
// clamp to_wait_ms to max of int as SDL_WaitEventTimeout() accepts int type
630-
to_wait_ms = std::min(to_wait_ms, uint32_t(std::numeric_limits<int32_t>::max()));
631629

632630
render(*app);
633631

632+
// clamp to_wait_ms to max of int as SDL_WaitEventTimeout() accepts int type
633+
to_wait_ms = std::min(to_wait_ms, uint32_t(std::numeric_limits<int32_t>::max()));
634+
634635
if (SDL_WaitEventTimeout(nullptr, int(to_wait_ms)) == 0) {
635636
// No events or error. In case of error not much we can do, just ignore it.
636637
return;
@@ -693,7 +694,7 @@ void main_loop_iteration(void* user_data)
693694
[[fallthrough]];
694695
case SDL_KEYUP:
695696
{
696-
auto key = sdl_scan_code_to_ruis_key(e.key.keysym.scancode);
697+
auto key = sdl_scancode_to_ruis_key(e.key.keysym.scancode);
697698
if (e.key.repeat == 0) {
698699
handle_key_event(
699700
*app, //

0 commit comments

Comments
 (0)