瀏覽代碼

make GetTime available to user of library

pull/420/head
user 7 年之前
父節點
當前提交
48d0c93ace
共有 2 個檔案被更改,包括 5 行新增2 行删除
  1. +2
    -2
      src/core.c
  2. +3
    -0
      src/raylib.h

+ 2
- 2
src/core.c 查看文件

@ -352,7 +352,7 @@ extern void UnloadDefaultFont(void); // [Module: text] Unloads default fo
static void InitGraphicsDevice(int width, int height); // Initialize graphics device
static void SetupFramebufferSize(int displayWidth, int displayHeight);
static void InitTimer(void); // Initialize timer
static double GetTime(void); // Returns time since InitTimer() was run
double GetTime(void); // Returns time since InitTimer() was run
static void Wait(float ms); // Wait for some milliseconds (stop program execution)
static bool GetKeyStatus(int key); // Returns if a key has been pressed
static bool GetMouseButtonStatus(int button); // Returns if a mouse button has been pressed
@ -2120,7 +2120,7 @@ static void InitTimer(void)
}
// Get current time measure (in seconds) since InitTimer()
static double GetTime(void)
double GetTime(void)
{
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
return glfwGetTime();

+ 3
- 0
src/raylib.h 查看文件

@ -723,6 +723,9 @@ RLAPI void SetTargetFPS(int fps); // Set target
RLAPI int GetFPS(void); // Returns current FPS
RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn
RLAPI double GetTime(void); // Return time in seconds
// Color-related functions
RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color
RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value

Loading…
取消
儲存