--- SheepShaver/src/Unix/main_unix.cpp 2004/06/22 17:10:07 1.41 +++ SheepShaver/src/Unix/main_unix.cpp 2004/06/24 15:37:25 1.42 @@ -127,7 +127,13 @@ #include "debug.h" +#ifdef USE_SDL +#include +#endif + +#ifndef USE_SDL_VIDEO #include +#endif #ifdef ENABLE_GTK #include @@ -272,11 +278,13 @@ int64 BusClockSpeed; // Bus clock speed // Global variables +#ifndef USE_SDL_VIDEO char *x_display_name = NULL; // X11 display name Display *x_display = NULL; // X11 display handle #ifdef X11_LOCK_TYPE X11_LOCK_TYPE x_display_lock = X11_LOCK_INIT; // X11 display lock #endif +#endif static int zero_fd = 0; // FD of /dev/zero static bool lm_area_mapped = false; // Flag: Low Memory area mmap()ped @@ -452,16 +460,35 @@ int main(int argc, char **argv) for (int i=1; i 0) return; @@ -2166,7 +2201,7 @@ void display_alert(int title_id, int pre void ErrorAlert(const char *text) { -#ifdef ENABLE_GTK +#if defined(ENABLE_GTK) && !defined(USE_SDL_VIDEO) if (PrefsFindBool("nogui") || x_display == NULL) { printf(GetString(STR_SHELL_ERROR_PREFIX), text); return; @@ -2185,7 +2220,7 @@ void ErrorAlert(const char *text) void WarningAlert(const char *text) { -#ifdef ENABLE_GTK +#if defined(ENABLE_GTK) && !defined(USE_SDL_VIDEO) if (PrefsFindBool("nogui") || x_display == NULL) { printf(GetString(STR_SHELL_WARNING_PREFIX), text); return;