mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Remove love.timer SDL implementation files, since they don’t do anything.
--HG-- branch : minor
This commit is contained in:
@@ -147,7 +147,6 @@
|
||||
# define LOVE_ENABLE_THREAD
|
||||
# define LOVE_ENABLE_THREAD_SDL
|
||||
# define LOVE_ENABLE_TIMER
|
||||
# define LOVE_ENABLE_TIMER_SDL
|
||||
# define LOVE_ENABLE_TOUCH
|
||||
# define LOVE_ENABLE_TOUCH_SDL
|
||||
# define LOVE_ENABLE_UTF8
|
||||
|
||||
@@ -27,6 +27,8 @@ namespace love
|
||||
|
||||
void sleep(unsigned int ms)
|
||||
{
|
||||
// We don't need to initialize the SDL timer subsystem for SDL_Delay to
|
||||
// function - and doing so causes SDL to create a worker thread.
|
||||
SDL_Delay(ms);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,38 +37,39 @@ public:
|
||||
virtual ~Timer() {}
|
||||
|
||||
// Implements Module.
|
||||
virtual ModuleType getModuleType() const { return M_TIMER; }
|
||||
ModuleType getModuleType() const override { return M_TIMER; }
|
||||
const char *getName() const override { return "love.timer"; }
|
||||
|
||||
/**
|
||||
* Measures the time between this call and the previous call,
|
||||
* and updates internal values accordinly.
|
||||
**/
|
||||
virtual void step();
|
||||
void step();
|
||||
|
||||
/**
|
||||
* Tries to sleep for the specified amount of time. The precision is
|
||||
* usually 1ms.
|
||||
* @param seconds The number of seconds to sleep for.
|
||||
**/
|
||||
virtual void sleep(double seconds) const;
|
||||
void sleep(double seconds) const;
|
||||
|
||||
/**
|
||||
* Gets the time between the last two frames, assuming step is called
|
||||
* each frame.
|
||||
**/
|
||||
virtual double getDelta() const;
|
||||
double getDelta() const;
|
||||
|
||||
/**
|
||||
* Gets the average FPS over the last second. Beucase the value is only updated
|
||||
* once per second, it does not look erratic when displayed on screen.
|
||||
* @return The "current" FPS.
|
||||
**/
|
||||
virtual int getFPS() const;
|
||||
int getFPS() const;
|
||||
|
||||
/**
|
||||
* Gets the average delta time (seconds per frame) over the last second.
|
||||
**/
|
||||
virtual double getAverageDelta() const;
|
||||
double getAverageDelta() const;
|
||||
|
||||
/**
|
||||
* Gets the amount of time passed since an unspecified time. Useful for
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2006-2016 LOVE Development Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
|
||||
// LOVE
|
||||
#include "Timer.h"
|
||||
|
||||
namespace love
|
||||
{
|
||||
namespace timer
|
||||
{
|
||||
namespace sdl
|
||||
{
|
||||
|
||||
Timer::Timer()
|
||||
{
|
||||
// We don't need to initialize the SDL timer subsystem for SDL_Delay to
|
||||
// function - and doing so causes SDL to create a worker thread.
|
||||
}
|
||||
|
||||
Timer::~Timer()
|
||||
{
|
||||
}
|
||||
|
||||
const char *Timer::getName() const
|
||||
{
|
||||
return "love.timer.sdl";
|
||||
}
|
||||
|
||||
} // sdl
|
||||
} // timer
|
||||
} // love
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2006-2016 LOVE Development Team
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any purpose,
|
||||
* including commercial applications, and to alter it and redistribute it
|
||||
* freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you must not
|
||||
* claim that you wrote the original software. If you use this software
|
||||
* in a product, an acknowledgment in the product documentation would be
|
||||
* appreciated but is not required.
|
||||
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||
* misrepresented as being the original software.
|
||||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
**/
|
||||
|
||||
#ifndef LOVE_TIMER_SDL_TIMER_H
|
||||
#define LOVE_TIMER_SDL_TIMER_H
|
||||
|
||||
// LOVE
|
||||
#include "timer/Timer.h"
|
||||
|
||||
namespace love
|
||||
{
|
||||
namespace timer
|
||||
{
|
||||
namespace sdl
|
||||
{
|
||||
|
||||
class Timer : public love::timer::Timer
|
||||
{
|
||||
public:
|
||||
|
||||
Timer();
|
||||
virtual ~Timer();
|
||||
const char *getName() const override;
|
||||
|
||||
}; // Timer
|
||||
|
||||
} // sdl
|
||||
} // timer
|
||||
} // love
|
||||
|
||||
#endif // LOVE_TIMER_SDL_TIMER_H
|
||||
Reference in New Issue
Block a user