Remove useless argument
Do not pass any data to the event watcher, it is unused.
This commit is contained in:
parent
c530d95881
commit
8a3c6a3ae7
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ static struct input_manager input_manager = {
|
||||||
//
|
//
|
||||||
// <https://bugzilla.libsdl.org/show_bug.cgi?id=2077>
|
// <https://bugzilla.libsdl.org/show_bug.cgi?id=2077>
|
||||||
// <https://stackoverflow.com/a/40693139/1987178>
|
// <https://stackoverflow.com/a/40693139/1987178>
|
||||||
static int event_watcher(void* data, SDL_Event* event) {
|
static int event_watcher(void *data, SDL_Event *event) {
|
||||||
if (event->type == SDL_WINDOWEVENT && event->window.event == SDL_WINDOWEVENT_RESIZED) {
|
if (event->type == SDL_WINDOWEVENT && event->window.event == SDL_WINDOWEVENT_RESIZED) {
|
||||||
// called from another thread, not very safe, but it's a workaround!
|
// called from another thread, not very safe, but it's a workaround!
|
||||||
screen_render(&screen);
|
screen_render(&screen);
|
||||||
|
@ -56,7 +56,7 @@ static int event_watcher(void* data, SDL_Event* event) {
|
||||||
|
|
||||||
static void event_loop(void) {
|
static void event_loop(void) {
|
||||||
#ifdef CONTINUOUS_RESIZING_WORKAROUND
|
#ifdef CONTINUOUS_RESIZING_WORKAROUND
|
||||||
SDL_AddEventWatch(event_watcher, screen.window);
|
SDL_AddEventWatch(event_watcher, NULL);
|
||||||
#endif
|
#endif
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
while (SDL_WaitEvent(&event)) {
|
while (SDL_WaitEvent(&event)) {
|
||||||
|
|
Loading…
Reference in a new issue