mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 11:24:27 +01:00
ImGui: Implement cursor support on Windows
This commit is contained in:
1 parent
3cc7d6ef7a
commit
8cc77c0997
3 files changed
+35
No files matched your search
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "imgui_impl_platform.h"
|
||||
|
||||
static ImGuiMouseCursor g_cursor = ImGuiMouseCursor_Arrow;
|
||||
|
||||
void ImGui_ImplPlatform_KeyEvent(const KeyInput &key) {
|
||||
ImGuiIO &io = ImGui::GetIO();
|
||||
|
||||
@@ -94,6 +96,7 @@ void ImGui_ImplPlatform_NewFrame() {
|
||||
|
||||
double now = time_now_d();
|
||||
|
||||
g_cursor = ImGui::GetMouseCursor();
|
||||
ImGuiIO &io = ImGui::GetIO();
|
||||
io.DisplaySize = ImVec2(g_display.pixel_xres, g_display.pixel_yres);
|
||||
io.DisplayFramebufferScale = ImVec2(1.0f, 1.0f);
|
||||
@@ -102,6 +105,10 @@ void ImGui_ImplPlatform_NewFrame() {
|
||||
lastTime = now;
|
||||
}
|
||||
|
||||
ImGuiMouseCursor ImGui_ImplPlatform_GetCursor() {
|
||||
return g_cursor;
|
||||
}
|
||||
|
||||
// Written by chatgpt
|
||||
ImGuiKey KeyCodeToImGui(InputKeyCode keyCode) {
|
||||
switch (keyCode) {
|
||||
|
||||
Reference in new issue
Block a user