added back video_resized event which was accidentally removed

This commit is contained in:
Anthony Pesch 2017-07-16 15:27:39 -04:00
parent b1eee3b0bf
commit d796f47cc8
2 changed files with 5 additions and 6 deletions

View File

@ -726,6 +726,7 @@ struct emu *emu_create(struct host *host) {
/* setup host, bind event callbacks */
emu->host = host;
emu->host->userdata = emu;
emu->host->video_resized = &emu_host_resized;
emu->host->video_context_reset = &emu_host_context_reset;
emu->host->video_context_destroyed = &emu_host_context_destroyed;
emu->host->input_keydown = &emu_host_keydown;

View File

@ -706,12 +706,10 @@ static void host_poll_events(struct sdl_host *host) {
} break;
case SDL_WINDOWEVENT:
switch (ev.window.event) {
case SDL_WINDOWEVENT_RESIZED: {
host->video_width = ev.window.data1;
host->video_height = ev.window.data2;
video_resized(host);
} break;
if (ev.window.event == SDL_WINDOWEVENT_RESIZED) {
host->video_width = ev.window.data1;
host->video_height = ev.window.data2;
video_resized(host);
}
break;