Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d117cd3b8b |
@@ -91,10 +91,6 @@ namespace backend
|
||||
SDL_SetClipboardText(value);
|
||||
}
|
||||
|
||||
uint64_t get_time_ms() {
|
||||
return SDL_GetTicks();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -31,6 +31,7 @@ namespace backend
|
||||
window = SDL_CreateWindow(title, width*zoom, height*zoom, SDL_WINDOW_OPENGL|(mini::win::state.fullscreen?SDL_WINDOW_FULLSCREEN:0));
|
||||
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengl");
|
||||
renderer = SDL_CreateRenderer(window, NULL);
|
||||
SDL_SetRenderVSync(renderer, SDL_RENDERER_VSYNC_DISABLED);
|
||||
|
||||
// Mostrar o ocultar el cursor
|
||||
if (mini::win::state.cursor) SDL_ShowCursor(); else SDL_HideCursor();
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
namespace backend
|
||||
{
|
||||
// uint64_t get_time_ms() {
|
||||
// using namespace std::chrono;
|
||||
// return duration_cast<milliseconds>(
|
||||
// steady_clock::now().time_since_epoch()
|
||||
// ).count();
|
||||
// }
|
||||
uint32_t get_time_ms() {
|
||||
using namespace std::chrono;
|
||||
return duration_cast<milliseconds>(
|
||||
steady_clock::now().time_since_epoch()
|
||||
).count();
|
||||
}
|
||||
|
||||
void exit() {
|
||||
current_state = quitting;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace backend
|
||||
void poll_events();
|
||||
const state_t& state();
|
||||
void exit();
|
||||
uint64_t get_time_ms();
|
||||
uint32_t get_time_ms();
|
||||
char* clipboard();
|
||||
void clipboard(const char* value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user