Windows: Add UWP support, part 1.

Contributed by Ben Pye.
This commit is contained in:
Mike Pall
2018-06-05 17:03:08 +02:00
parent a5a89ab586
commit c3c54ce1ae
10 changed files with 78 additions and 20 deletions

View File

@@ -247,7 +247,7 @@ static DWORD WINAPI profile_thread(void *psx)
{
ProfileState *ps = (ProfileState *)psx;
int interval = ps->interval;
#if LJ_TARGET_WINDOWS
#if LJ_TARGET_WINDOWS && !LJ_TARGET_UWP
ps->wmm_tbp(interval);
#endif
while (1) {
@@ -255,7 +255,7 @@ static DWORD WINAPI profile_thread(void *psx)
if (ps->abort) break;
profile_trigger(ps);
}
#if LJ_TARGET_WINDOWS
#if LJ_TARGET_WINDOWS && !LJ_TARGET_UWP
ps->wmm_tep(interval);
#endif
return 0;
@@ -264,9 +264,9 @@ static DWORD WINAPI profile_thread(void *psx)
/* Start profiling timer thread. */
static void profile_timer_start(ProfileState *ps)
{
#if LJ_TARGET_WINDOWS
#if LJ_TARGET_WINDOWS && !LJ_TARGET_UWP
if (!ps->wmm) { /* Load WinMM library on-demand. */
ps->wmm = LoadLibraryExA("winmm.dll", NULL, 0);
ps->wmm = LJ_WIN_LOADLIBA("winmm.dll");
if (ps->wmm) {
ps->wmm_tbp = (WMM_TPFUNC)GetProcAddress(ps->wmm, "timeBeginPeriod");
ps->wmm_tep = (WMM_TPFUNC)GetProcAddress(ps->wmm, "timeEndPeriod");