Skip to content

Commit

Permalink
[sys/macosx]: OS X Fixes
Browse files Browse the repository at this point in the history
also [isysev.c]: SDLK_PRINT is now SDLK_PRINTSCREEN
  • Loading branch information
mrpapersonic committed Jun 21, 2022
1 parent 00e3e63 commit 25784ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion schism/isysev.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static void keytab_init(void)

// Miscellaneous function keys
{SDLK_HELP, "Help"},
{SDLK_PRINT, "Print"},
{SDLK_PRINTSCREEN, "Print Screen"},
{SDLK_SYSREQ, "SysRq"},
{SDLK_BREAK, "Break"},
{SDLK_MENU, "Menu"},
Expand Down
5 changes: 3 additions & 2 deletions sys/macosx/macosx-sdlmain.m
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ - (void) applicationDidFinishLaunching: (NSNotification *) note
[self setupWorkingDirectory:gFinderLaunch];

/* Hand off to main application code */
status = SDL_main (gArgc, gArgv);
status = SDL_Init (gArgv);

/* We're done, thank you for playing */
exit(status);
Expand Down Expand Up @@ -502,7 +502,8 @@ - (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString


/* Main entry point to executable - should *not* be SDL_main! */
int main (int argc, char **argv)
/* JK LOL... SDL2 */
int SDL_main (int argc, char **argv)
{
/* Copy the arguments into a global variable */
/* This is passed if we are launched by double-clicking */
Expand Down
2 changes: 1 addition & 1 deletion sys/macosx/osdefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int macosx_sdlevent(SDL_Event *event)
if (event->key.keysym.sym == 0) {
switch (event->key.keysym.scancode) {
case 106: // mac F16 key
event->key.keysym.sym = SDLK_PRINT;
event->key.keysym.sym = SDLK_PRINTSCREEN;
event->key.keysym.mod = KMOD_CTRL;
return 1;
case 234: // XXX what key is this?
Expand Down

0 comments on commit 25784ce

Please sign in to comment.