mirror of https://github.com/OpenRCT2/OpenRCT2.git
fixes #564 - ebp not restored on mouse down event call
This commit is contained in:
parent
e9c3e8f1c1
commit
2be36b1621
|
@ -1602,6 +1602,7 @@ void window_event_mouse_down_call(rct_window *w, int widgetIndex)
|
|||
|
||||
#ifdef _MSC_VER
|
||||
__asm {
|
||||
push ebp
|
||||
push address
|
||||
push widget
|
||||
push w
|
||||
|
@ -1611,9 +1612,11 @@ void window_event_mouse_down_call(rct_window *w, int widgetIndex)
|
|||
mov esi, w
|
||||
call[esp + 12]
|
||||
add esp, 16
|
||||
pop ebp
|
||||
}
|
||||
#else
|
||||
__asm__("\
|
||||
push ebp \n\
|
||||
push %[address]\n\
|
||||
mov edi, %[widget] \n\
|
||||
mov eax, %[w] \n\
|
||||
|
@ -1624,6 +1627,7 @@ void window_event_mouse_down_call(rct_window *w, int widgetIndex)
|
|||
mov esi, %[w] \n\
|
||||
call [esp+12] \n\
|
||||
add esp, 16 \n\
|
||||
pop ebp \n\
|
||||
" :[address] "+m" (address), [w] "+m" (w), [widget] "+m" (widget), [widgetIndex] "+m" (widgetIndex): : "eax", "esi", "edx", "edi"
|
||||
);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue