RetroArch/ui/drivers/win32/ui_win32_application.c

64 lines
1.6 KiB
C
Raw Normal View History

2016-06-07 17:03:34 +02:00
/* RetroArch - A frontend for libretro.
2017-01-22 13:40:32 +01:00
* Copyright (C) 2011-2017 - Daniel De Matteis
2016-06-07 17:03:34 +02:00
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <boolean.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
2016-06-07 17:03:34 +02:00
#include "../../ui_companion_driver.h"
2018-04-30 14:33:05 -04:00
static void* ui_application_win32_initialize(void)
2016-06-09 15:22:03 +02:00
{
2018-04-30 14:33:05 -04:00
return NULL;
2016-06-09 15:22:03 +02:00
}
2016-06-07 18:02:37 +02:00
static bool ui_application_win32_pending_events(void)
2016-06-07 17:03:34 +02:00
{
MSG msg;
2016-06-07 18:02:37 +02:00
return PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
}
2016-06-07 18:02:37 +02:00
static void ui_application_win32_process_events(void)
{
while (ui_application_win32_pending_events())
{
2016-06-07 18:02:37 +02:00
MSG msg;
2016-06-07 18:02:37 +02:00
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
2016-06-07 18:02:37 +02:00
TranslateMessage(&msg);
DispatchMessage (&msg);
}
}
2016-06-07 17:03:34 +02:00
}
2018-04-30 14:33:05 -04:00
static void ui_application_win32_run(void *args)
{
(void)args;
}
ui_application_t ui_application_win32 = {
2016-06-09 15:22:03 +02:00
ui_application_win32_initialize,
2016-06-07 18:02:37 +02:00
ui_application_win32_pending_events,
2016-06-07 17:03:34 +02:00
ui_application_win32_process_events,
2018-04-30 14:33:05 -04:00
ui_application_win32_run,
NULL,
2016-06-07 17:03:34 +02:00
"win32"
};