diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/d_iwad.c | 9 | ||||
-rw-r--r-- | src/doomtype.h | 7 | ||||
-rw-r--r-- | src/i_main.c | 9 | ||||
-rw-r--r-- | src/i_system.c | 47 | ||||
-rw-r--r-- | src/i_video.c | 13 | ||||
-rw-r--r-- | src/m_controls.c | 68 | ||||
-rw-r--r-- | src/setup/display.c | 4 | ||||
-rw-r--r-- | src/setup/execute.c | 4 | ||||
-rw-r--r-- | src/setup/mainmenu.c | 4 |
10 files changed, 3 insertions, 167 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index b9112c21..e6754a6b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,8 +40,7 @@ net_structrw.c net_structrw.h \ z_native.c z_zone.h @PROGRAM_PREFIX@server_SOURCES=$(COMMON_SOURCE_FILES) $(DEDSERV_FILES) -@PROGRAM_PREFIX@server_LDADD = $(top_builddir)/wince/libc_wince.a \ - @LDFLAGS@ @SDLNET_LIBS@ +@PROGRAM_PREFIX@server_LDADD = @LDFLAGS@ @SDLNET_LIBS@ # Source files used by the game binaries (chocolate-doom, etc.) @@ -137,7 +136,6 @@ SOURCE_FILES_WITH_DEH = $(SOURCE_FILES) \ $(FEATURE_DEHACKED_SOURCE_FILES) EXTRA_LIBS = \ - $(top_builddir)/wince/libc_wince.a \ $(top_builddir)/textscreen/libtextscreen.a \ $(top_builddir)/pcsound/libpcsound.a \ $(top_builddir)/opl/libopl.a \ @@ -200,7 +198,6 @@ else @PROGRAM_PREFIX@setup_SOURCES=$(SETUP_FILES) $(COMMON_SOURCE_FILES) endif @PROGRAM_PREFIX@setup_LDADD = setup/libsetup.a \ - $(top_builddir)/wince/libc_wince.a \ $(top_builddir)/textscreen/libtextscreen.a \ @LDFLAGS@ @SDL_LIBS@ @SDLMIXER_LIBS@ @SDLNET_LIBS@ diff --git a/src/d_iwad.c b/src/d_iwad.c index 7e850d53..715687de 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -536,14 +536,7 @@ static void BuildIWADDirList(void) AddDoomWadPath(); -#if defined(_WIN32_WCE) - - // Windows CE locations: - - AddIWADDir("\\Storage Card"); - AddIWADDir(getenv("HOME")); - -#elif defined(_WIN32) +#ifdef _WIN32 // Search the registry and find where IWADs have been installed. diff --git a/src/doomtype.h b/src/doomtype.h index b458c1cd..fdcdb66b 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -64,13 +64,6 @@ #define PACKEDATTR #endif -// Windows CE is missing some vital ANSI C functions. We have to -// use our own replacements. - -#ifdef _WIN32_WCE -#include "libc_wince.h" -#endif - // C99 integer types; with gcc we just use this. Other compilers // should add conditional statements that define the C99 types. diff --git a/src/i_main.c b/src/i_main.c index fdfa3cbc..3714bee4 100644 --- a/src/i_main.c +++ b/src/i_main.c @@ -140,15 +140,6 @@ int main(int argc, char **argv) myargc = argc; myargv = argv; -#ifdef _WIN32_WCE - - // Windows CE has no environment, but SDL provides an implementation. - // Populate the environment with the values we normally find. - - PopulateEnvironment(); - -#endif - // Only schedule on a single core, if we have multiple // cores. This is to work around a bug in SDL_mixer. diff --git a/src/i_system.c b/src/i_system.c index 328fd9f5..5e3ae89e 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -94,51 +94,6 @@ void I_Tactile(int on, int off, int total) { } -#ifdef _WIN32_WCE - -// Windows CE-specific auto-allocation function that allocates the zone -// size based on the amount of memory reported free by the OS. - -static byte *AutoAllocMemory(int *size, int default_ram, int min_ram) -{ - MEMORYSTATUS memory_status; - byte *zonemem; - size_t available; - - // Get available physical RAM. We leave one megabyte extra free - // for the OS to keep running (my PDA becomes unstable if too - // much RAM is allocated) - - GlobalMemoryStatus(&memory_status); - available = memory_status.dwAvailPhys - 2 * 1024 * 1024; - - // Limit to default_ram if we have more than that available: - - if (available > default_ram * 1024 * 1024) - { - available = default_ram * 1024 * 1024; - } - - if (available < min_ram * 1024 * 1024) - { - I_Error("Unable to allocate %i MiB of RAM for zone", min_ram); - } - - // Allocate zone: - - *size = available; - zonemem = malloc(*size); - - if (zonemem == NULL) - { - I_Error("Failed when allocating %i bytes", *size); - } - - return zonemem; -} - -#else - // Zone memory auto-allocation function that allocates the zone size // by trying progressively smaller zone sizes until one is found that // works. @@ -181,8 +136,6 @@ static byte *AutoAllocMemory(int *size, int default_ram, int min_ram) return zonemem; } -#endif - byte *I_ZoneBase (int *size) { byte *zonemem; diff --git a/src/i_video.c b/src/i_video.c index bf8ab77b..406a8c5a 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -308,17 +308,6 @@ static boolean MouseShouldBeGrabbed() if (fullscreen) return true; -#ifdef _WIN32_WCE - - // On Windows CE, always grab input. This is because hardware - // button events are only acquired by SDL when the input is grabbed. - // Almost all Windows CE devices should have touch screens anyway, - // so this shouldn't affect mouse grabbing behavior. - - return true; - -#else - // Don't grab the mouse if mouse input is disabled if (!usemouse || nomouse) @@ -340,8 +329,6 @@ static boolean MouseShouldBeGrabbed() { return true; } - -#endif /* #ifndef _WIN32_WCE */ } void I_SetGrabMouseCallback(grabmouse_callback_t func) diff --git a/src/m_controls.c b/src/m_controls.c index 409f26bf..41b97fdd 100644 --- a/src/m_controls.c +++ b/src/m_controls.c @@ -370,70 +370,6 @@ void M_BindChatControls(unsigned int num_players) } } -#ifdef _WIN32_WCE - -#define WIN32_LEAN_AND_MEAN -#include <windows.h> - -static int SystemHasKeyboard(void) -{ - HKEY key; - DWORD valtype; - DWORD valsize; - DWORD result; - - if (RegOpenKeyExW(HKEY_CURRENT_USER, - L"\\Software\\Microsoft\\Shell", 0, - KEY_READ, &key) != ERROR_SUCCESS) - { - return 0; - } - - valtype = REG_SZ; - valsize = sizeof(DWORD); - - if (RegQueryValueExW(key, L"HasKeyboard", NULL, &valtype, - (LPBYTE) &result, &valsize) != ERROR_SUCCESS) - { - result = 0; - } - - // Close the key - - RegCloseKey(key); - - return result; -} - -// -// Apply custom defaults for Windows CE. -// - -static void M_ApplyWindowsCEDefaults(void) -{ - // If the system doesn't have a keyboard, patch the default - // configuration to use the hardware keys. - - if (!SystemHasKeyboard()) - { - key_use = KEY_F1; - key_fire = KEY_F2; - key_menu_activate = KEY_F3; - key_map_toggle = KEY_F4; - - key_menu_help = 0; - key_menu_save = 0; - key_menu_load = 0; - key_menu_volume = 0; - - key_menu_confirm = KEY_ENTER; - key_menu_back = KEY_F2; - key_menu_abort = KEY_F2; - } -} - -#endif - // // Apply custom patches to the default values depending on the // platform we are running on. @@ -441,8 +377,6 @@ static void M_ApplyWindowsCEDefaults(void) void M_ApplyPlatformDefaults(void) { -#ifdef _WIN32_WCE - M_ApplyWindowsCEDefaults(); -#endif + // no-op. Add your platform-specific patches here. } diff --git a/src/setup/display.c b/src/setup/display.c index d22cc67b..e988e36f 100644 --- a/src/setup/display.c +++ b/src/setup/display.c @@ -22,10 +22,6 @@ #include <stdlib.h> #include <string.h> -#ifdef _WIN32_WCE -#include "libc_wince.h" -#endif - #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/src/setup/execute.c b/src/setup/execute.c index 96a14fae..57fe71c3 100644 --- a/src/setup/execute.c +++ b/src/setup/execute.c @@ -28,10 +28,6 @@ #include <sys/types.h> -#if defined(_WIN32_WCE) -#include "libc_wince.h" -#endif - #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN diff --git a/src/setup/mainmenu.c b/src/setup/mainmenu.c index be4b0999..74e77fd5 100644 --- a/src/setup/mainmenu.c +++ b/src/setup/mainmenu.c @@ -23,10 +23,6 @@ #include <stdlib.h> #include <string.h> -#ifdef _WIN32_WCE -#include "libc_wince.h" -#endif - #include "config.h" #include "textscreen.h" |