if (!vid_hidden)
{
- CHECKGLERROR
if (r_speeds.integer == 2 || gl_finish.integer)
- {
- qglFinish();CHECKGLERROR
- }
+ GL_Finish();
qaglSwapBuffers(context);
}
VID_UpdateGamma(false, GAMMA_TABLE_SIZE);
void signal_handler(int sig)
{
- printf("Received signal %d, exiting...\n", sig);
+ Sys_PrintfToTerminal("Received signal %d, exiting...\n", sig);
VID_RestoreSystemGamma();
Sys_Quit(1);
}
if (context == NULL && window == NULL)
return;
+ VID_EnableJoystick(false);
VID_SetMouse(false, false, false);
VID_RestoreSystemGamma();
}
}
- memset(&vid.support, 0, sizeof(vid.support));
-
if ((qglGetString = (const GLubyte* (GLAPIENTRY *)(GLenum name))GL_GetProcAddress("glGetString")) == NULL)
Sys_Error("glGetString not found in %s", gl_driver);
}
}
+void VID_BuildJoyState(vid_joystate_t *joystate)
+{
+ VID_Shared_BuildJoyState_Begin(joystate);
+ VID_Shared_BuildJoyState_Finish(joystate);
+}
+
+void VID_EnableJoystick(qboolean enable)
+{
+ int index = joy_enable.integer > 0 ? joy_index.integer : -1;
+ qboolean success = false;
+ int sharedcount = 0;
+ sharedcount = VID_Shared_SetJoystick(index);
+ if (index >= 0 && index < sharedcount)
+ success = true;
+
+ // update cvar containing count of XInput joysticks
+ if (joy_detected.integer != sharedcount)
+ Cvar_SetValueQuick(&joy_detected, sharedcount);
+
+ Cvar_SetValueQuick(&joy_active, success ? 1 : 0);
+}
+
void IN_Move (void)
{
+ vid_joystate_t joystate;
+ VID_EnableJoystick(true);
+ VID_BuildJoyState(&joystate);
+ VID_ApplyJoyState(&joystate);
}
static bool GetDictionaryBoolean(CFDictionaryRef d, const void *key)
return value;
}
+vid_mode_t *VID_GetDesktopMode(void)
+{
+ return NULL; // FIXME add desktopfullscreen
+}
+
size_t VID_ListModes(vid_mode_t *modes, size_t maxcount)
{
CGDirectDisplayID mainDisplay = CGMainDisplayID();