mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 11:21:30 +11:00
Fix for stuck scrollwheel on macOS
This commit is contained in:
parent
2b2540067c
commit
883679e96b
|
@ -299,7 +299,7 @@ void mfb_topmost(void* window, bool topmost)
|
||||||
if(topmost)
|
if(topmost)
|
||||||
{
|
{
|
||||||
win.level = NSFloatingWindowLevel; // set level to floating
|
win.level = NSFloatingWindowLevel; // set level to floating
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
win.level = 0; // set to default/normal
|
win.level = 0; // set to default/normal
|
||||||
}
|
}
|
||||||
|
@ -479,6 +479,11 @@ static int update_events()
|
||||||
|
|
||||||
static int generic_update(OSXWindow* win)
|
static int generic_update(OSXWindow* win)
|
||||||
{
|
{
|
||||||
|
if (win->shared_data) {
|
||||||
|
win_shared_data->scroll_x = 0.0f;
|
||||||
|
win_shared_data->scroll_y = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
int state = update_events();
|
int state = update_events();
|
||||||
|
|
||||||
if (win->shared_data) {
|
if (win->shared_data) {
|
||||||
|
|
Loading…
Reference in a new issue