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