Skip to content

Commit eee074d

Browse files
Do not use nanosleep on windows at all (PLATFORM_DESKTOP_RGFW)
1 parent 9e95f88 commit eee074d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/external/RGFW.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -2753,8 +2753,8 @@ typedef struct { i32 x, y; } RGFW_vector;
27532753
4,
27542754
&actualType,
27552755
&actualFormat,
2756-
&count,
2757-
&bytesAfter,
2756+
(unsigned long*) &count,
2757+
(unsigned long*) &bytesAfter,
27582758
(u8**) &formats);
27592759
} else {
27602760
formats = (Atom*) RGFW_MALLOC(E.xclient.data.l[2] + E.xclient.data.l[3] + E.xclient.data.l[4]);
@@ -3002,7 +3002,6 @@ typedef struct { i32 x, y; } RGFW_vector;
30023002
win->src.winArgs &= ~RGFW_MOUSE_CHANGED;
30033003
}
30043004

3005-
RGFW_vector mouse = RGFW_getGlobalMousePoint();
30063005
if (win->src.winArgs & RGFW_HOLD_MOUSE && win->event.inFocus && win->event.type == RGFW_mousePosChanged) {
30073006
RGFW_window_moveMouse(win, RGFW_VECTOR(win->r.x + (win->r.w / 2), win->r.y + (win->r.h / 2)));
30083007

@@ -6074,7 +6073,7 @@ static HMODULE wglinstance = NULL;
60746073
}
60756074

60766075
void RGFW_sleep(u32 ms) {
6077-
#ifndef _MSC_VER
6076+
#ifndef RGFW_WINDOWS
60786077
struct timespec time;
60796078
time.tv_sec = 0;
60806079
time.tv_nsec = ms * 1000;

0 commit comments

Comments
 (0)