瀏覽代碼

Fix SUPPORT_WINMM_HIGHRES_TIMER for PLATFORM_DESKTOP_SDL (#3679)

pull/3687/head
ubkp 1 年之前
committed by GitHub
父節點
當前提交
43b4f90eb7
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      src/platforms/rcore_desktop_sdl.c

+ 5
- 1
src/platforms/rcore_desktop_sdl.c 查看文件

@ -1112,7 +1112,7 @@ void PollInputEvents(void)
case SDL_TEXTINPUT: case SDL_TEXTINPUT:
{ {
// NOTE: event.text.text data comes an UTF-8 text sequence but we register codepoints (int) // NOTE: event.text.text data comes an UTF-8 text sequence but we register codepoints (int)
int codepointSize = 0; int codepointSize = 0;
// Check if there is space available in the key queue // Check if there is space available in the key queue
@ -1426,6 +1426,10 @@ int InitPlatform(void)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// NOTE: No need to call InitTimer(), let SDL manage it internally // NOTE: No need to call InitTimer(), let SDL manage it internally
CORE.Time.previous = GetTime(); // Get time as double CORE.Time.previous = GetTime(); // Get time as double
#if defined(_WIN32) && defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
SDL_SetHint(SDL_HINT_TIMER_RESOLUTION, "1"); // SDL equivalent of timeBeginPeriod() and timeEndPeriod()
#endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Initialize storage system // Initialize storage system

Loading…
取消
儲存