浏览代码

Update RGFW (#4048)

* Fix Makefile issues (RGFW) (linux) (macOS)

* Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW)

* remove #define RGFWDEF and make the #undefs only happen for their OS

* Update RGFW.h

* fix to match the RGFW updates

* remove line that shows the cursor for no reason
pull/4049/head
Colleague Riley 10 个月前
committed by GitHub
父节点
当前提交
8c712f82d1
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 2 个文件被更改,包括 556 次插入324 次删除
  1. +551
    -321
      src/external/RGFW.h
  2. +5
    -3
      src/platforms/rcore_desktop_rgfw.c

+ 551
- 321
src/external/RGFW.h
文件差异内容过多而无法显示
查看文件


+ 5
- 3
src/platforms/rcore_desktop_rgfw.c 查看文件

@ -431,7 +431,11 @@ void SetWindowFocused(void)
// Get native window handle // Get native window handle
void *GetWindowHandle(void) void *GetWindowHandle(void)
{ {
return platform.window->src.window;
#ifndef RGFW_WINDOWS
return (void*)platform.window->src.window;
#else
return platform.window->src.hwnd;
#endif
} }
// Get number of monitors // Get number of monitors
@ -890,8 +894,6 @@ void PollInputEvents(void)
CORE.Input.Mouse.currentPosition.x = (event->point.x - (platform.window->r.w / 2)) * 2; CORE.Input.Mouse.currentPosition.x = (event->point.x - (platform.window->r.w / 2)) * 2;
CORE.Input.Mouse.currentPosition.y = (event->point.y - (platform.window->r.h / 2)) * 2; CORE.Input.Mouse.currentPosition.y = (event->point.y - (platform.window->r.h / 2)) * 2;
RGFW_window_showMouse(platform.window, 1);
} }
else { else {
CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition; CORE.Input.Mouse.previousPosition = CORE.Input.Mouse.currentPosition;

正在加载...
取消
保存