Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Define console_get_size externally on iOS
Browse files Browse the repository at this point in the history
This is a quick, non-intrusive hack. The ideal solution would be
making the console more modular so we could have a special console
driver for iOS.
  • Loading branch information
fernandotcl committed Mar 28, 2019
1 parent 35b4716 commit a7d05d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions temu.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ static void term_resize_handler(int sig)
global_stdio_device->resize_pending = TRUE;
}

#if defined(__APPLE__) && TARGET_OS_IPHONE
extern void console_get_size(void *opaque, int *pw, int *ph);
#else
static void console_get_size(STDIODevice *s, int *pw, int *ph)
{
struct winsize ws;
Expand All @@ -178,6 +181,7 @@ static void console_get_size(STDIODevice *s, int *pw, int *ph)
*pw = width;
*ph = height;
}
#endif

CharacterDevice *console_init(BOOL allow_ctrlc)
{
Expand Down

0 comments on commit a7d05d8

Please sign in to comment.