From e21dcb59c8cc8228b1b9fa0b76dc73c26ed8afc5 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 13 Jan 2024 15:43:15 +0100 Subject: [PATCH] Small tweaks. --- sfw/game_scene.cpp | 3 --- sfw/render_core/window.cpp | 6 +++--- sfw/render_core/window.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sfw/game_scene.cpp b/sfw/game_scene.cpp index d604634..bcc1029 100644 --- a/sfw/game_scene.cpp +++ b/sfw/game_scene.cpp @@ -88,9 +88,6 @@ void GameScene::render() { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - - static float rotmi = 0; if (render_type == 0) { diff --git a/sfw/render_core/window.cpp b/sfw/render_core/window.cpp index 5c32bb4..02a6543 100644 --- a/sfw/render_core/window.cpp +++ b/sfw/render_core/window.cpp @@ -775,12 +775,12 @@ void AppWindow::create_default_cursors() { } } -void AppWindow::set_cursor_shape(unsigned mode) { - _cursorshape = (mode &= 7); +void AppWindow::set_cursor_shape(const CURSOR_SHAPES mode) { + _cursorshape = static_cast(mode); create_default_cursors(); - glfwSetCursor(_window, mode < 7 ? cursors[mode] : NULL); + glfwSetCursor(_window, _cursorshape < 7 ? cursors[_cursorshape] : NULL); } void AppWindow::set_mouse_mode(MouseMode p_mode) { diff --git a/sfw/render_core/window.h b/sfw/render_core/window.h index e43dc68..bf249b2 100644 --- a/sfw/render_core/window.h +++ b/sfw/render_core/window.h @@ -113,7 +113,7 @@ public: CURSOR_SW_AUTO, // software cursor, ui driven. note: this is the only icon that may be recorded or snapshotted }; - void set_cursor_shape(unsigned shape); + void set_cursor_shape(const CURSOR_SHAPES shape); const char *get_clipboard(); void set_clipboard(const char *text);