mirror of https://github.com/ZDoom/raze-gles.git
More SDL 1.2 on Windows stuff that should not have been removed in r4749 and was missed in r4774.
git-svn-id: https://svn.eduke32.com/eduke32@5637 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
dce9e3c91e
commit
92d223aa36
|
@ -22,6 +22,8 @@ int32_t wm_ynbox(const char *name, const char *fmt, ...)
|
||||||
if (r >= 0)
|
if (r >= 0)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
#elif defined _WIN32
|
||||||
|
return (MessageBox(win_gethwnd(),buf,name,MB_YESNO|MB_ICONQUESTION|MB_TASKMODAL) == IDYES);
|
||||||
#elif defined GEKKO
|
#elif defined GEKKO
|
||||||
puts(buf);
|
puts(buf);
|
||||||
puts("Assuming yes...");
|
puts("Assuming yes...");
|
||||||
|
@ -99,6 +101,10 @@ int32_t initsystem(void)
|
||||||
|
|
||||||
mutex_init(&m_initprintf);
|
mutex_init(&m_initprintf);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
win_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (sdlayer_checkversion())
|
if (sdlayer_checkversion())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -225,7 +231,9 @@ uint64_t getu64ticks(void)
|
||||||
|
|
||||||
uint64_t getu64tickspersec(void)
|
uint64_t getu64tickspersec(void)
|
||||||
{
|
{
|
||||||
# if defined __APPLE__
|
# if defined _WIN32
|
||||||
|
return win_timerfreq;
|
||||||
|
# elif defined __APPLE__
|
||||||
static mach_timebase_info_data_t ti;
|
static mach_timebase_info_data_t ti;
|
||||||
if (ti.denom == 0)
|
if (ti.denom == 0)
|
||||||
(void) mach_timebase_info(&ti); // ti.numer/ti.denom: nsec/(m_a_t() tick)
|
(void) mach_timebase_info(&ti); // ti.numer/ti.denom: nsec/(m_a_t() tick)
|
||||||
|
@ -367,6 +375,10 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
if (nogl)
|
if (nogl)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
# ifdef _WIN32
|
||||||
|
win_setvideomode(c);
|
||||||
|
# endif
|
||||||
|
|
||||||
struct glattribs
|
struct glattribs
|
||||||
{
|
{
|
||||||
SDL_GLattr attr;
|
SDL_GLattr attr;
|
||||||
|
@ -412,6 +424,9 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
loadglextensions();
|
||||||
|
#endif
|
||||||
} while (multisamplecheck--);
|
} while (multisamplecheck--);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -554,6 +569,11 @@ int32_t handleevents_pollsdl(void)
|
||||||
if (mousegrab && moustat)
|
if (mousegrab && moustat)
|
||||||
grabmouse_low(!!appactive);
|
grabmouse_low(!!appactive);
|
||||||
#endif
|
#endif
|
||||||
|
# ifdef _WIN32
|
||||||
|
if (backgroundidle)
|
||||||
|
SetPriorityClass(GetCurrentProcess(),
|
||||||
|
appactive ? NORMAL_PRIORITY_CLASS : IDLE_PRIORITY_CLASS);
|
||||||
|
# endif
|
||||||
rv = -1;
|
rv = -1;
|
||||||
|
|
||||||
if (ev.active.state & SDL_APPMOUSEFOCUS)
|
if (ev.active.state & SDL_APPMOUSEFOCUS)
|
||||||
|
|
Loading…
Reference in New Issue