X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fxmatrix.c;h=9f97bb773205cde19267a905b0d2170b35ea0f4b;hp=adccb0c66dd091a696bcd9a2e903c5fca6fa81a5;hb=39809ded547bdbb08207d3e514950425215b4410;hpb=4361b69d3178d7fc98d0388f9a223af6c2651aba diff --git a/hacks/xmatrix.c b/hacks/xmatrix.c index adccb0c6..9f97bb77 100644 --- a/hacks/xmatrix.c +++ b/hacks/xmatrix.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1999-2015 Jamie Zawinski +/* xscreensaver, Copyright (c) 1999-2017 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -1331,6 +1331,33 @@ hack_text (m_state *state) state->typing_delay = state->typing_char_delay; if (state->typing_cursor_p) set_cursor (state, True); + +# ifdef USE_IPHONE + /* Stupid iPhone X bezel. + #### This is the worst of all possible ways to do this! But how else? + */ + if (state->xgwa.width == 2436 || state->xgwa.height == 2436) + switch (state->mode) + { + case TRACE_TEXT_A: + case TRACE_TEXT_B: + case KNOCK: + case NMAP: + { + int off = 5 * (state->small_p ? 2 : 1); + if (state->xgwa.width > state->xgwa.height) + { + state->typing_left_margin += off; + state->cursor_x += off; + } + else + { + state->cursor_y += off; + } + } + default: break; + } +# endif } else {