From e404a5201d2b2c3fb12c9cd035439ad25d5ca477 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 21 Aug 2015 02:16:48 +0200 Subject: [PATCH] x11: Get rid of one platform ifdef --- core/linux-dist/x11.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/core/linux-dist/x11.cpp b/core/linux-dist/x11.cpp index 93b42c655..22a6a90db 100644 --- a/core/linux-dist/x11.cpp +++ b/core/linux-dist/x11.cpp @@ -15,11 +15,13 @@ #include "linux-dist/main.h" #if defined(TARGET_PANDORA) - #define WINDOW_WIDTH 800 + #define DEFAULT_FULLSCREEN 1 + #define DEFAULT_WINDOW_WIDTH 800 #else - #define WINDOW_WIDTH 640 + #define DEFAULT_FULLSCREEN 0 + #define DEFAULT_WINDOW_WIDTH 640 #endif -#define WINDOW_HEIGHT 480 +#define DEFAULT_WINDOW_HEIGHT 480 map x11_keymap; int x11_dc_buttons = 0xFFFF; @@ -28,8 +30,6 @@ int x11_keyboard_input = 0; int ndcid = 0; void* x11_glc; bool x11_fullscreen = false; -int x11_width; -int x11_height; enum { @@ -218,15 +218,9 @@ void x11_window_create() sWA.event_mask = StructureNotifyMask | ExposureMask | ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask; ui32Mask = CWBackPixel | CWBorderPixel | CWEventMask | CWColormap; - #ifdef TARGET_PANDORA - x11_width = 800; - x11_height = 480; - x11_fullscreen = true; - #else - x11_width = cfgLoadInt("x11", "width", WINDOW_WIDTH); - x11_height = cfgLoadInt("x11", "height", WINDOW_HEIGHT); - x11_fullscreen = (cfgLoadInt("x11", "fullscreen", 0) > 0); - #endif + int x11_width = cfgLoadInt("x11", "width", DEFAULT_WINDOW_WIDTH); + int x11_height = cfgLoadInt("x11", "height", DEFAULT_WINDOW_HEIGHT); + x11_fullscreen = (cfgLoadInt("x11", "fullscreen", DEFAULT_FULLSCREEN) > 0); if (x11_width < 0 || x11_height < 0) {