Skip to content

Commit ad5fd96

Browse files
committed
Fix Ctrl+Scroll not working in RGFW version
1 parent fc7e299 commit ad5fd96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main_rgfw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ u64 RGFW_getTimerValue(void) {
4343
QueryPerformanceCounter((LARGE_INTEGER*)&value);
4444
return value;
4545
}
46-
#else
46+
#else
4747
// TODO: make RGFW_getTimerFreq, RGFW_getTimerValue, RGFW_sleep compile on the rest of the platforms (Windows, MacOS)
4848
void RGFW_sleep(u64 ms) {
4949
struct timespec time;
@@ -384,8 +384,8 @@ int main(int argc, char **argv)
384384
} break;
385385
}
386386
} break;
387-
case RGFW_mouseButtonPressed: {
388-
if (event.key.mod & RGFW_modControl) {
387+
case RGFW_mouseScroll: {
388+
if (RGFW_isKeyDown(RGFW_controlL) || RGFW_isKeyDown(RGFW_controlR)) {
389389
if (event.scroll.y > 0) {
390390
state.user_scale += SCALE_FACTOR * state.user_scale;
391391
} else if (event.scroll.y < 0) {

0 commit comments

Comments
 (0)