#ifndef _LI_SDL_H
#define _LI_SDL_H 1
#include "Renderer.hpp"
#include "DvdSpin/RenderDvdSpin.hpp"

#include <SDL.h>
#include <SDL_syswm.h>
#include <string>

namespace Li::Gui {
	class SDL {
	private:
		SDL_WindowFlags windowFlags;
		SDL_SysWMinfo wmInfo;
		SDL_Window* window;
		
		float maxFps;
		uint32_t limit;

		uint32_t lastRenderTime;
		uint32_t curRenderTime;
		uint32_t delta;

		Renderer* renderer;
		bool isExiting;

	public:
		bool IsExiting();
		void NewFrame();
		void SetMaxFPS(float fpsLimit);
		void PollEvent();
		void Render();
		Renderer* Renderer();
		SDL(std::string windowTitle, int windowWidth, int windowHeight);
		~SDL();
	};
}
#endif