mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 21:41:50 +00:00
final, but buuugs
This commit is contained in:
parent
82562300ff
commit
5e19c6807c
5 changed files with 13 additions and 27 deletions
|
|
@ -89,6 +89,7 @@ void input_sdl::pollEvents() {
|
|||
cursor = {event.motion.x, event.motion.y};
|
||||
break;
|
||||
case SDL_EVENT_WINDOW_RESIZED:
|
||||
window.setSize({event.window.data1, event.window.data2});
|
||||
break;
|
||||
case SDL_EVENT_TEXT_INPUT:
|
||||
std::vector<char> vec(
|
||||
|
|
|
|||
|
|
@ -344,12 +344,12 @@ void window_sdl::resetScissor() {
|
|||
}
|
||||
|
||||
double window_sdl::time() {
|
||||
return static_cast<double>(SDL_GetTicks()) / 1000;
|
||||
return static_cast<double>(SDL_GetTicksNS()) / 1'000'000'000;
|
||||
}
|
||||
|
||||
void window_sdl::setFramerate(int framerate) {
|
||||
/*todo*/
|
||||
if (!SDL_GL_SetSwapInterval(1)) {
|
||||
if (!SDL_GL_SetSwapInterval(framerate)) {
|
||||
logger.error() << "Failed to set framerate: " << SDL_GetError();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue