From b639a296ec6bd1390c34fc49e63dd48460805ee6 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Fri, 14 Feb 2014 17:36:22 -0500 Subject: [PATCH] clean out some osapi cruft --- include/osapi.h | 3 --- src/freespace2/freespace.cpp | 4 ++-- src/osapi/osapi.cpp | 12 ------------ 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/include/osapi.h b/include/osapi.h index 4dd0337..3a778c5 100644 --- a/include/osapi.h +++ b/include/osapi.h @@ -54,9 +54,6 @@ uint os_get_window(); // call to process windows messages. only does something in non THREADED mode void os_poll(); -// Sleeps for n milliseconds or until app becomes active. -void os_sleep(int ms); - // Used to stop message processing void os_suspend(); diff --git a/src/freespace2/freespace.cpp b/src/freespace2/freespace.cpp index b7b9606..e276146 100644 --- a/src/freespace2/freespace.cpp +++ b/src/freespace2/freespace.cpp @@ -4802,7 +4802,7 @@ void game_do_frame() if ( game_single_step && (last_single_step == game_single_step) ) { os_set_title( NOX("SINGLE STEP MODE (Pause exits, any other key steps)") ); while( key_checkch() == 0 ) - os_sleep(10); + SDL_Delay(10); os_set_title( XSTR( "FreeSpace", 171) ); Last_time = timer_get_fixed_seconds(); } @@ -4929,7 +4929,7 @@ int game_poll() if (!os_foreground()) { game_stop_time(); - os_sleep(100); + SDL_Delay(100); game_start_time(); // If we're in a single player game, pause it. diff --git a/src/osapi/osapi.cpp b/src/osapi/osapi.cpp index be91f09..56ff25e 100644 --- a/src/osapi/osapi.cpp +++ b/src/osapi/osapi.cpp @@ -161,10 +161,6 @@ // os-wide globals static int fAppActive = 1; -//static int main_window_inited = 0; // not used (here) -//static char szWinTitle[128]; // not used (here) -//static char szWinClass[128]; // not used (here) -//static int WinX, WinY, WinW, WinH; // not used (grsoft.cpp) in UNIX build static int Os_inited = 0; static SDL_mutex *Os_lock; @@ -221,8 +217,6 @@ void os_set_title( const char *title ) // call at program end void os_cleanup() { - STUB_FUNCTION; - #ifndef NDEBUG outwnd_close(); #endif @@ -247,12 +241,6 @@ uint os_get_window() // process management ----------------------------------------------------------------- -// Sleeps for n milliseconds or until app becomes active. -void os_sleep(int ms) -{ - usleep(ms*1000); -} - // Used to stop message processing void os_suspend() { -- 2.39.2