summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/duke3d/Engine/src/display.c
diff options
context:
space:
mode:
authorVencislav Atanasov <user890104@freemyipod.org>2019-07-28 23:31:50 +0300
committerVencislav Atanasov <user890104@freemyipod.org>2019-07-29 01:59:40 +0300
commit183e45e8d0b4425bbd41fab37f2a4dc143e1e27c (patch)
tree5e25c211f6a3bd46dc594123451af00c1bf7ef9c /apps/plugins/sdl/progs/duke3d/Engine/src/display.c
parente19857e712ff54cec08d5a6342a32dae2788cb50 (diff)
downloadrockbox-183e45e8d0b4425bbd41fab37f2a4dc143e1e27c.tar.gz
rockbox-183e45e8d0b4425bbd41fab37f2a4dc143e1e27c.zip
sdl: Remove platform-specific code
Also nuke the Makefiles of Duke Nukem 3D (pun intended). Change-Id: If2707cf079bfb9299347f9c5f980780134b6ecda
Diffstat (limited to 'apps/plugins/sdl/progs/duke3d/Engine/src/display.c')
-rw-r--r--apps/plugins/sdl/progs/duke3d/Engine/src/display.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/apps/plugins/sdl/progs/duke3d/Engine/src/display.c b/apps/plugins/sdl/progs/duke3d/Engine/src/display.c
index 501ffa411c..c16c8fb25c 100644
--- a/apps/plugins/sdl/progs/duke3d/Engine/src/display.c
+++ b/apps/plugins/sdl/progs/duke3d/Engine/src/display.c
@@ -69,10 +69,6 @@ void TIMER_GetPlatformTicks(int64_t* t);
69 69
70 70
71 71
72#if ((defined PLATFORM_WIN32))
73#include <windows.h>
74#endif
75
76#include "draw.h" 72#include "draw.h"
77#include "cache.h" 73#include "cache.h"
78 74
@@ -763,12 +759,6 @@ void _platform_init(int argc, char **argv, const char *title, const char *ico
763 } 759 }
764 760
765 761
766
767#ifdef __APPLE__
768 SDL_putenv("SDL_VIDEODRIVER=Quartz");
769#endif
770
771
772 if (SDL_Init(SDL_INIT_VIDEO) == -1){ 762 if (SDL_Init(SDL_INIT_VIDEO) == -1){
773 Error(EXIT_FAILURE, "BUILDSDL: SDL_Init() failed!\nBUILDSDL: SDL_GetError() says \"%s\".\n", SDL_GetError()); 763 Error(EXIT_FAILURE, "BUILDSDL: SDL_Init() failed!\nBUILDSDL: SDL_GetError() says \"%s\".\n", SDL_GetError());
774 } 764 }
@@ -946,14 +936,11 @@ int32_t _setgamemode(uint8_t davidoption, int32_t daxdim, int32_t daydim)
946 SDL_Surface *image; 936 SDL_Surface *image;
947 Uint32 colorkey; 937 Uint32 colorkey;
948 938
949 // don't override higher-res app icon on OS X
950#ifndef PLATFORM_MACOSX
951 // Install icon 939 // Install icon
952 image = SDL_LoadBMP_RW(SDL_RWFromMem(iconBMP, iconBMP_size), 1); 940 image = SDL_LoadBMP_RW(SDL_RWFromMem(iconBMP, iconBMP_size), 1);
953 colorkey = 0; // index in this image to be transparent 941 colorkey = 0; // index in this image to be transparent
954 SDL_SetColorKey(image, SDL_SRCCOLORKEY, colorkey); 942 SDL_SetColorKey(image, SDL_SRCCOLORKEY, colorkey);
955 SDL_WM_SetIcon(image,NULL); 943 SDL_WM_SetIcon(image,NULL);
956#endif
957 944
958 if (daxdim > MAXXDIM || daydim > MAXYDIM) 945 if (daxdim > MAXXDIM || daydim > MAXYDIM)
959 { 946 {
@@ -1915,29 +1902,6 @@ void uninitkeys(void)
1915 /* does nothing in SDL. Key input handling is set up elsewhere. */ 1902 /* does nothing in SDL. Key input handling is set up elsewhere. */
1916} 1903}
1917 1904
1918
1919//unsigned int32_t getticks(void)
1920//{
1921// return(SDL_GetTicks());
1922//} /* getticks */
1923
1924
1925//Timer on windows 98 used to be really poor but now it is very accurate
1926// We can just use what SDL uses, no need for QueryPerformanceFrequency or QueryPerformanceCounter
1927// (which I bet SDL is using anyway).
1928#if 0//PLATFORM_WIN32
1929int TIMER_GetPlatformTicksInOneSecond(int64_t* t)
1930{
1931 QueryPerformanceFrequency((LARGE_INTEGER*)t);
1932 return 1;
1933}
1934
1935void TIMER_GetPlatformTicks(int64_t* t)
1936{
1937 QueryPerformanceCounter((LARGE_INTEGER*)t);
1938}
1939#else
1940//FCS: Let's try to use SDL again: Maybe SDL library is accurate enough now.
1941int TIMER_GetPlatformTicksInOneSecond(int64_t* t) 1905int TIMER_GetPlatformTicksInOneSecond(int64_t* t)
1942{ 1906{
1943 *t = 1000; 1907 *t = 1000;
@@ -1948,6 +1912,5 @@ void TIMER_GetPlatformTicks(int64_t* t)
1948{ 1912{
1949 *t = SDL_GetTicks(); 1913 *t = SDL_GetTicks();
1950} 1914}
1951#endif
1952/* end of sdl_driver.c ... */ 1915/* end of sdl_driver.c ... */
1953 1916