mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove a few more SDL calls from core library
This commit is contained in:
parent
cf0dcb4753
commit
08ae74293d
|
@ -420,11 +420,11 @@ namespace OpenRCT2
|
|||
void RunFixedFrame()
|
||||
{
|
||||
_uncapTick = 0;
|
||||
uint32 currentTick = SDL_GetTicks();
|
||||
uint32 currentTick = platform_get_ticks();
|
||||
uint32 ticksElapsed = currentTick - _lastTick;
|
||||
if (ticksElapsed < UPDATE_TIME_MS)
|
||||
{
|
||||
SDL_Delay(UPDATE_TIME_MS - ticksElapsed);
|
||||
platform_sleep(UPDATE_TIME_MS - ticksElapsed);
|
||||
_lastTick += UPDATE_TIME_MS;
|
||||
}
|
||||
else
|
||||
|
@ -441,7 +441,7 @@ namespace OpenRCT2
|
|||
|
||||
void RunVariableFrame()
|
||||
{
|
||||
uint32 currentTick = SDL_GetTicks();
|
||||
uint32 currentTick = platform_get_ticks();
|
||||
if (_uncapTick == 0)
|
||||
{
|
||||
_uncapTick = currentTick;
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
#pragma endregion
|
||||
|
||||
#include "../config/Config.h"
|
||||
#include "../Context.h"
|
||||
#include "../game.h"
|
||||
#include "../input.h"
|
||||
#include "../interface/viewport.h"
|
||||
#include "../localisation/date.h"
|
||||
#include "../localisation/localisation.h"
|
||||
|
@ -546,7 +548,11 @@ uint16 hire_new_staff_member(uint8 staffType)
|
|||
command_y = command_z = esi = new_sprite_index = ebp = 0;
|
||||
command_x = 0x8000;
|
||||
|
||||
sint32 autoposition = gConfigGeneral.auto_staff_placement == ((SDL_GetModState() & KMOD_SHIFT) == 0);
|
||||
sint32 autoposition = gConfigGeneral.auto_staff_placement;
|
||||
if (gInputPlaceObjectModifier & PLACE_OBJECT_MODIFIER_SHIFT_Z) {
|
||||
autoposition = autoposition ^ 1;
|
||||
}
|
||||
|
||||
ebx = autoposition << 16 | staffType << 8 | GAME_COMMAND_FLAG_APPLY;
|
||||
|
||||
game_command_callback = game_command_callback_hire_new_staff_member;
|
||||
|
|
|
@ -55,12 +55,6 @@ SDL_PixelFormat *gBufferTextureFormat = NULL;
|
|||
SDL_Color gPalette[256];
|
||||
uint32 gPaletteHWMapped[256];
|
||||
|
||||
bool gSteamOverlayActive = false;
|
||||
|
||||
static const sint32 _fullscreen_modes[] = { 0, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_FULLSCREEN_DESKTOP };
|
||||
static uint32 _lastGestureTimestamp;
|
||||
static float _gestureRadius;
|
||||
|
||||
void platform_draw()
|
||||
{
|
||||
if (!gOpenRCT2Headless) {
|
||||
|
|
Loading…
Reference in New Issue