12 #ifndef WIN32 // Goober5000
29 #define THREADED // to use the proper set of macros
37 static int fAppActive = 1;
38 static char szWinTitle[128];
39 static char szWinClass[128];
40 static int Os_inited = 0;
64 return (getenv(
"HOME"));
69 void os_init(
const char * wclass,
const char * title,
const char *app_name,
const char *version_string )
95 SDL_WM_SetCaption( szWinTitle, NULL );
160 while( SDL_PollEvent(&event) ) {
162 case SDL_ACTIVEEVENT:
163 if( (event.active.state & SDL_APPACTIVE) || (event.active.state & SDL_APPINPUTFOCUS) ) {
164 if (fAppActive != event.active.gain) {
173 fAppActive =
event.active.gain;
185 if(
SDLtoFS2[event.key.keysym.sym] ) {
196 if (
SDLtoFS2[event.key.keysym.sym]) {
201 case SDL_MOUSEBUTTONDOWN:
202 case SDL_MOUSEBUTTONUP:
203 if (event.button.button == SDL_BUTTON_LEFT)
205 else if (event.button.button == SDL_BUTTON_MIDDLE)
207 else if (event.button.button == SDL_BUTTON_RIGHT)
212 case SDL_JOYHATMOTION:
216 case SDL_JOYBUTTONDOWN:
217 case SDL_JOYBUTTONUP:
244 mprintf((
"Int3(): From %s at line %d\n", file, line));
253 #endif // Goober5000 - #ifndef WIN32
void key_mark(uint code, int state, uint latency)
#define DELETE_CRITICAL_SECTION(csc)
#define MOUSE_LEFT_BUTTON
bool Cmdline_no_unfocus_pause
#define MOUSE_MIDDLE_BUTTON
void os_init_registry_stuff(const char *company, const char *app, const char *version)
SDL_mutex * CRITICAL_SECTION
const char * os_config_read_string(const char *section, const char *name, const char *default_value)
void os_init(const char *wclass, const char *title, const char *app_name, const char *version_string)
void joy_set_button_state(int button, int state)
void os_config_write_string(const char *section, const char *name, const char *value)
void joy_set_hat_state(int position)
void os_set_title(const char *title)
#define ENTER_CRITICAL_SECTION(csc)
DWORD unix_process(DWORD lparam)
void debug_int3(char *file, int line)
const char * Osreg_company_name
#define MOUSE_RIGHT_BUTTON
#define LEAVE_CRITICAL_SECTION(csc)
#define INITIALIZE_CRITICAL_SECTION(csc)
const char * detect_home(void)
void gr_opengl_shutdown()
void mouse_mark_button(uint flags, int set)