DumpDVD/DumpDVD/Gui/SDL.hpp

38 lines
662 B
C++
Raw Normal View History

2023-03-14 13:36:58 +00:00
#ifndef _LI_SDL_H
#define _LI_SDL_H 1
#include "Renderer.hpp"
2023-03-20 09:39:23 +00:00
#include "DvdSpin/RenderDvdSpin.hpp"
2023-03-14 13:36:58 +00:00
#include <SDL.h>
#include <SDL_syswm.h>
#include <string>
namespace Li::Gui {
class SDL {
private:
SDL_WindowFlags windowFlags;
SDL_SysWMinfo wmInfo;
SDL_Window* window;
2023-03-19 02:37:35 +00:00
float maxFps;
uint32_t limit;
uint32_t lastRenderTime;
uint32_t curRenderTime;
uint32_t delta;
2023-03-14 13:36:58 +00:00
Renderer* renderer;
bool isExiting;
2023-03-15 07:53:00 +00:00
2023-03-14 13:36:58 +00:00
public:
bool IsExiting();
void NewFrame();
2023-03-19 02:37:35 +00:00
void SetMaxFPS(float fpsLimit);
2023-03-14 13:36:58 +00:00
void PollEvent();
void Render();
2023-03-20 09:39:23 +00:00
Renderer* Renderer();
2023-03-14 13:36:58 +00:00
SDL(std::string windowTitle, int windowWidth, int windowHeight);
~SDL();
};
}
#endif