static double originalMouseSpeed = -1.0;
-io_connect_t IN_GetIOHandle()
+io_connect_t IN_GetIOHandle(void)
{
io_connect_t iohandle = MACH_PORT_NULL;
kern_return_t status;
Con_Printf("ERROR: can't %s vsync\n", vid_usevsync ? "activate" : "deactivate");
}
- if (r_render.integer)
+ if (!vid_hidden)
{
CHECKGLERROR
if (r_speeds.integer == 2 || gl_finish.integer)
VID_RestoreSystemGamma();
}
- if (sound_active != windowIsActive)
+ if (windowIsActive || !snd_mutewhenidle.integer)
{
- sound_active = windowIsActive;
- if (sound_active)
+ if (!sound_active)
+ {
S_UnblockSound ();
- else
+ sound_active = true;
+ }
+ }
+ else
+ {
+ if (sound_active)
+ {
S_BlockSound ();
+ sound_active = false;
+ }
}
}
long GetDictionaryLong(CFDictionaryRef d, const void *key)
{
long value = 0;
- CFBooleanRef ref = (CFBooleanRef) CFDictionaryGetValue(d, key);
+ CFNumberRef ref = (CFNumberRef) CFDictionaryGetValue(d, key);
if(ref)
CFNumberGetValue(ref, kCFNumberLongType, &value);
return value;
size_t VID_ListModes(vid_mode_t *modes, size_t maxcount)
{
+ CGDirectDisplayID mainDisplay = CGMainDisplayID();
CFArrayRef vidmodes = CGDisplayAvailableModes(mainDisplay);
CFDictionaryRef thismode;
unsigned int n = CFArrayGetCount(vidmodes);
unsigned int i;
size_t k;
- CGDirectDisplayID mainDisplay = CGMainDisplayID();
k = 0;
for(i = 0; i < n; ++i)