diff options
author | bunnei <bunneidev@gmail.com> | 2019-02-27 17:26:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 17:26:24 +0100 |
commit | 14430f7df96942ec06a20d293c763e46f6220206 (patch) | |
tree | 96053ff87617924fe9ddf4a3a412fdd0aa26f53f /src | |
parent | Merge pull request #2161 from lioncash/handle-table (diff) | |
parent | core/frontend/emu_window: Make ClipToTouchScreen a const member function (diff) | |
download | yuzu-14430f7df96942ec06a20d293c763e46f6220206.tar yuzu-14430f7df96942ec06a20d293c763e46f6220206.tar.gz yuzu-14430f7df96942ec06a20d293c763e46f6220206.tar.bz2 yuzu-14430f7df96942ec06a20d293c763e46f6220206.tar.lz yuzu-14430f7df96942ec06a20d293c763e46f6220206.tar.xz yuzu-14430f7df96942ec06a20d293c763e46f6220206.tar.zst yuzu-14430f7df96942ec06a20d293c763e46f6220206.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/frontend/emu_window.cpp | 2 | ||||
-rw-r--r-- | src/core/frontend/emu_window.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index 9dd493efb..e29afd630 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp @@ -67,7 +67,7 @@ static bool IsWithinTouchscreen(const Layout::FramebufferLayout& layout, unsigne framebuffer_x >= layout.screen.left && framebuffer_x < layout.screen.right); } -std::tuple<unsigned, unsigned> EmuWindow::ClipToTouchScreen(unsigned new_x, unsigned new_y) { +std::tuple<unsigned, unsigned> EmuWindow::ClipToTouchScreen(unsigned new_x, unsigned new_y) const { new_x = std::max(new_x, framebuffer_layout.screen.left); new_x = std::min(new_x, framebuffer_layout.screen.right - 1); diff --git a/src/core/frontend/emu_window.h b/src/core/frontend/emu_window.h index 7006a37b3..d0bcb4660 100644 --- a/src/core/frontend/emu_window.h +++ b/src/core/frontend/emu_window.h @@ -166,7 +166,7 @@ private: /** * Clip the provided coordinates to be inside the touchscreen area. */ - std::tuple<unsigned, unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y); + std::tuple<unsigned, unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y) const; }; } // namespace Core::Frontend |