diff options
Diffstat (limited to 'View.cpp')
-rw-r--r-- | View.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -31,7 +31,6 @@ void View::work() { continue; } if (e.type == SDL_EVENT_KEY_DOWN) { - if (e.key.repeat) continue; this->controller.ev_keydown(static_cast<KeyboardCode>(e.key.scancode)); } if (e.type == SDL_EVENT_MOUSE_BUTTON_DOWN) { @@ -93,12 +92,7 @@ void View::draw_end() { void View::fill_rect(Rectangle r, Color c) { SDL_SetRenderDrawColor(this->renderer, c.red, c.green, c.blue, 255); - SDL_FRect rect = { - .x = static_cast<float>(r.x), - .y = static_cast<float>(r.y), - .w = static_cast<float>(r.width), - .h = static_cast<float>(r.height), - }; + SDL_FRect rect = { .x = r.x, .y = r.y, .w = r.width, .h = r.height, }; SDL_RenderFillRect(this->renderer, &rect); } |