| 7344 | |
| 7345 | #if defined(__APPLE__) |
| 7346 | static void scrollWheelUpdate(id selff, SEL _sel, id theEvent) { |
| 7347 | static const SEL deltaYSel = sel_registerName("deltaY"); |
| 7348 | |
| 7349 | #if defined(__aarch64__) // Thanks ruarq! |
| 7350 | double deltaY = ((double (*)(id, SEL))objc_msgSend)(theEvent, deltaYSel); |
| 7351 | #else |
| 7352 | double deltaY = ((double (*)(id, SEL))objc_msgSend_fpret)(theEvent, deltaYSel); |
| 7353 | #endif |
| 7354 | |
| 7355 | for (int i = 0; i < abs(deltaY); i++) { |
| 7356 | if (deltaY > 0) { |
| 7357 | ptrPGE->olc_UpdateMouseWheel(-1); |
| 7358 | } |
| 7359 | else if (deltaY < 0) { |
| 7360 | ptrPGE->olc_UpdateMouseWheel(1); |
| 7361 | } |
| 7362 | } |
| 7363 | } |
| 7364 | #endif |
| 7365 | static void ThreadFunct() { |
| 7366 | #if defined(__APPLE__) |
nothing calls this directly
no test coverage detected