mirror of https://github.com/encounter/SDL.git
Update switch/SDL_systimer.c; fix Switch link issues
This commit is contained in:
parent
dd75de95be
commit
b8bf551bc0
|
@ -920,7 +920,7 @@ if(SDL_LIBC)
|
||||||
check_symbol_exists("${_FN}" "math.h" ${_HAVEVAR})
|
check_symbol_exists("${_FN}" "math.h" ${_HAVEVAR})
|
||||||
endforeach()
|
endforeach()
|
||||||
set(CMAKE_REQUIRED_LIBRARIES)
|
set(CMAKE_REQUIRED_LIBRARIES)
|
||||||
if(NOT VITA)
|
if(NOT VITA AND NOT NINTENDO_SWITCH)
|
||||||
list(APPEND EXTRA_LIBS m)
|
list(APPEND EXTRA_LIBS m)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -2578,18 +2578,18 @@ elseif(NINTENDO_SWITCH)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${SWITCH_VIDEO_SOURCES})
|
set(SOURCE_FILES ${SOURCE_FILES} ${SWITCH_VIDEO_SOURCES})
|
||||||
set(HAVE_SDL_VIDEO TRUE)
|
set(HAVE_SDL_VIDEO TRUE)
|
||||||
set(SDL_VIDEO_OPENGL_EGL 1)
|
set(SDL_VIDEO_OPENGL_EGL 1)
|
||||||
set(HAVE_VIDEO_OPENGLES TRUE)
|
set(HAVE_OPENGLES TRUE)
|
||||||
set(SDL_VIDEO_OPENGL_ES2 1)
|
set(SDL_VIDEO_OPENGL_ES2 1)
|
||||||
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
set(SDL_VIDEO_RENDER_OGL_ES2 1)
|
||||||
set(SDL_VIDEO_OPENGL 1)
|
set(SDL_VIDEO_OPENGL 1)
|
||||||
set(HAVE_VIDEO_OPENGL TRUE)
|
set(HAVE_OPENGL TRUE)
|
||||||
endif()
|
endif()
|
||||||
set(SDL_STATIC_PIC ON)
|
set(SDL_STATIC_PIC ON)
|
||||||
list(APPEND EXTRA_LIBS EGL glapi drm_nouveau nx m)
|
list(APPEND EXTRA_LIBS EGL glapi drm_nouveau)
|
||||||
add_definitions(-DSDL_VIDEO_STATIC_ANGLE)
|
add_definitions(-DSDL_VIDEO_STATIC_ANGLE)
|
||||||
set(HAVE_CLOCK_GETTIME 1)
|
set(HAVE_CLOCK_GETTIME 1)
|
||||||
set(PTHREADS ON)
|
set(SDL_PTHREADS ON)
|
||||||
set(PTHREADS_SEM ON)
|
set(SDL_PTHREADS_SEM ON)
|
||||||
CheckPTHREAD()
|
CheckPTHREAD()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -45,13 +45,14 @@ SDL_TicksQuit(void)
|
||||||
started = false;
|
started = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Uint32 SDL_GetTicks(void)
|
Uint64
|
||||||
|
SDL_GetTicks64(void)
|
||||||
{
|
{
|
||||||
if (!started) {
|
if (!started) {
|
||||||
SDL_TicksInit();
|
SDL_TicksInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Uint32) ((SDL_GetPerformanceCounter() - start) * 1000 / SDL_GetPerformanceFrequency());
|
return (SDL_GetPerformanceCounter() - start) * 1000 / SDL_GetPerformanceFrequency();
|
||||||
}
|
}
|
||||||
|
|
||||||
Uint64
|
Uint64
|
||||||
|
|
Loading…
Reference in New Issue