From 2a27ea0689786dc833b15322f269a6373cea4d8f Mon Sep 17 00:00:00 2001 From: anyc Date: Thu, 29 May 2014 01:19:09 +0200 Subject: [PATCH] fix ASM for MinGW --- src/game.c | 11 ++++++----- src/window_banner.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/game.c b/src/game.c index 8a619de450..16de96fbcd 100644 --- a/src/game.c +++ b/src/game.c @@ -671,16 +671,17 @@ static void RCT2_CALLPROC_WE_MOUSE_DOWN(int address, int widgetIndex, rct_windo #else __asm__("\ push %[address]\n\ - mov edx, widgetIndex \n\ - mov edi, widget + mov edi, %[widget] \n\ mov eax, %[w] \n\ - push edx \n\ - push eax \n\ + mov edx, %[widgetIndex] \n\ push edi \n\ + push eax \n\ + push edx \n\ mov esi, %[w] \n\ call [esp+12] \n\ add esp, 16 \n\ - " :[address] "+m" (address), [w] "+m" (w) : : "eax", "esi"); + " :[address] "+m" (address), [w] "+m" (w), [widget] "+m" (widget), [widgetIndex] "+m" (widgetIndex): : "eax", "esi", "edx", "edi" + ); #endif } diff --git a/src/window_banner.c b/src/window_banner.c index 663e42ba64..7b27b8fbe2 100644 --- a/src/window_banner.c +++ b/src/window_banner.c @@ -189,7 +189,7 @@ static void window_banner_mousedown(int widgetIndex, rct_window*w, rct_widget* w #ifdef _MSC_VER //__asm mov widgetIndex, dx #else - __asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) ); +// __asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) ); #endif