summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--src/sdl/sdl_input.c14
2 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index b17ab36b..9de1d488 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,12 @@ ifeq ($(COMPILE_PLATFORM),darwin)
COMPILE_ARCH=$(shell uname -p | sed -e s/i.86/x86/)
endif
+ifeq ($(COMPILE_PLATFORM),mingw32)
+ ifeq ($(COMPILE_ARCH),x86_64)
+ COMPILE_ARCH=x64
+ endif
+endif
+
ifndef BUILD_STANDALONE
BUILD_STANDALONE =
endif
@@ -630,7 +636,7 @@ ifeq ($(PLATFORM),freebsd)
endif
# cross-compiling tweaks
- ifeq ($(ARCH),i386)
+ ifeq ($(ARCH),x86)
ifeq ($(CROSS_COMPILING),1)
BASE_CFLAGS += -m32
endif
@@ -711,10 +717,7 @@ else # ifeq openbsd
ifeq ($(PLATFORM),netbsd)
- ifeq ($(shell uname -m),i386)
- ARCH=x86
- endif
-
+ ARCH=x86
LIBS=-lm
SHLIBEXT=so
SHLIBCFLAGS=-fPIC
diff --git a/src/sdl/sdl_input.c b/src/sdl/sdl_input.c
index 2cc3dcf4..4268a976 100644
--- a/src/sdl/sdl_input.c
+++ b/src/sdl/sdl_input.c
@@ -418,13 +418,13 @@ static void IN_GetUIMousePosition( int *x, int *y )
*x = pos & 0xFFFF;
*y = ( pos >> 16 ) & 0xFFFF;
- *x = glConfig.vidWidth * *x / 640;
- *y = glConfig.vidHeight * *y / 480;
+ *x = Cvar_VariableIntegerValue( "r_width" ) * *x / 640;
+ *y = Cvar_VariableIntegerValue( "r_height" ) * *y / 480;
}
else
{
- *x = glConfig.vidWidth / 2;
- *y = glConfig.vidHeight / 2;
+ *x = Cvar_VariableIntegerValue( "r_width" ) / 2;
+ *y = Cvar_VariableIntegerValue( "r_height" ) / 2;
}
}
@@ -437,8 +437,8 @@ static void IN_SetUIMousePosition( int x, int y )
{
if( uivm )
{
- x = x * 640 / glConfig.vidWidth;
- y = y * 480 / glConfig.vidHeight;
+ x = x * 640 / Cvar_VariableIntegerValue( "r_width" );
+ y = y * 480 / Cvar_VariableIntegerValue( "r_height" );
VM_Call( uivm, UI_SET_MOUSE_POSITION, x, y );
}
}
@@ -1036,7 +1036,7 @@ void IN_Frame( void )
// Loading in windowed mode
IN_DeactivateMouse( );
}
- else if( !r_fullscreen->integer && cursorShowing )
+ else if( !Cvar_VariableIntegerValue("r_fullscreen") && cursorShowing )
{
// Use WM cursor when not fullscreen
IN_DeactivateMouse( );