Skip to content

Commit

Permalink
Fix Windows Ctrl Handler declaration
Browse files Browse the repository at this point in the history
The handler function signature must include the calling convention
declaration.

Ref: <https://stackoverflow.com/questions/61717439/why-calling-setconsolectrlhandler-triggers-a-warning>
  • Loading branch information
rom1v committed May 10, 2020
1 parent 28abd98 commit a85848a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/scrcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a85848a

Please sign in to comment.