Fix Windows Ctrl Handler declaration

The handler function signature must include the calling convention
declaration.

Ref: <https://stackoverflow.com/questions/61717439/why-calling-setconsolectrlhandler-triggers-a-warning>
This commit is contained in:
Romain Vimont 2020-05-11 01:32:54 +02:00
parent 28abd98f7f
commit a85848a541

View file

@ -50,7 +50,7 @@ static struct input_manager input_manager = {
};
#ifdef _WIN32
BOOL windows_ctrl_handler(DWORD ctrl_type) {
BOOL WINAPI windows_ctrl_handler(DWORD ctrl_type) {
if (ctrl_type == CTRL_C_EVENT) {
SDL_Event event;
event.type = SDL_QUIT;