Updated source to match SDL function prototype style

This commit is contained in:
Sam Lantinga
2023-05-23 09:37:07 -07:00
parent a828f5897e
commit 737aa881fa
39 changed files with 95 additions and 191 deletions

View File

@@ -565,8 +565,7 @@ void SDL_QuitTicks(void)
tick_start = 0;
}
Uint64
SDL_GetTicksNS(void)
Uint64 SDL_GetTicksNS(void)
{
Uint64 starting_value, value;

View File

@@ -22,15 +22,13 @@
#if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED)
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
SDL_Unsupported();
return 0;
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
return 1;
}

View File

@@ -25,14 +25,12 @@
#include <kernel/OS.h>
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
return system_time();
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
return SDL_US_PER_SECOND;
}

View File

@@ -25,14 +25,12 @@
#include <3ds.h>
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
return svcGetSystemTick();
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
return SYSCLOCK_ARM11;
}

View File

@@ -32,15 +32,13 @@ extern "C" {
#endif
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
/* FIXME: Need to account for 32-bit wrapping */
return (Uint64)User::TickCount();
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
return SDL_US_PER_SECOND;
}

View File

@@ -29,14 +29,12 @@
#include <sys/time.h>
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
return GetTimerSystemTime();
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
return kBUSCLK;
}

View File

@@ -29,8 +29,7 @@
#include <pspthreadman.h>
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
Uint64 ticks;
struct timeval now;
@@ -42,8 +41,7 @@ SDL_GetPerformanceCounter(void)
return ticks;
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
return SDL_US_PER_SECOND;
}

View File

@@ -82,8 +82,7 @@ static void CheckMonotonicTime(void)
checked_monotonic_time = SDL_TRUE;
}
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
Uint64 ticks;
@@ -116,8 +115,7 @@ SDL_GetPerformanceCounter(void)
return ticks;
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
if (!checked_monotonic_time) {
CheckMonotonicTime();

View File

@@ -29,14 +29,12 @@
#include <psp2/kernel/processmgr.h>
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
return sceKernelGetProcessTimeWide();
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
return SDL_US_PER_SECOND;
}

View File

@@ -25,8 +25,7 @@
#include "../../core/windows/SDL_windows.h"
Uint64
SDL_GetPerformanceCounter(void)
Uint64 SDL_GetPerformanceCounter(void)
{
LARGE_INTEGER counter;
const BOOL rc = QueryPerformanceCounter(&counter);
@@ -34,8 +33,7 @@ SDL_GetPerformanceCounter(void)
return (Uint64)counter.QuadPart;
}
Uint64
SDL_GetPerformanceFrequency(void)
Uint64 SDL_GetPerformanceFrequency(void)
{
LARGE_INTEGER frequency;
const BOOL rc = QueryPerformanceFrequency(&frequency);