diff --git a/gui/gui.cpp b/gui/gui.cpp
index 8755689..9f22138 100644
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -185,6 +185,8 @@
   static struct timeval touchStart;
   HardwareKeyboard kb;
   string seconds;
+  int screen_width = gr_fb_width();
+  int screen_height = gr_fb_height();
 
   //start screen timeout threads
   blankTimer.setTimerThread();
@@ -198,7 +200,7 @@
 	  struct input_event ev;
 	  int state = 0, ret = 0;
 
-	  ret = ev_get (&ev, dontwait);
+	  ret = ev_get (&ev, dontwait, &screen_width, &screen_height);
 
 	  if (ret < 0)
 		{
diff --git a/minuitwrp/events.c b/minuitwrp/events.c
index 4368c15..2653d18 100644
--- a/minuitwrp/events.c
+++ b/minuitwrp/events.c
@@ -288,7 +288,7 @@
     return (screen_pos >= 0 && screen_pos < screen_size);
 }
 
-static int vk_tp_to_screen(struct position *p, int *x, int *y)
+static int vk_tp_to_screen(struct position *p, int *x, int *y, int *screen_width, int *screen_height)
 {
     if (p->xi.minimum == p->xi.maximum || p->yi.minimum == p->yi.maximum)
     {
@@ -298,17 +298,16 @@
         return 0;
     }
 
-#ifdef _EVENT_LOGGING
-    printf("EV: p->x=%d  x-range=%d,%d  fb-width=%d\n", p->x, p->xi.minimum, p->xi.maximum, gr_fb_width());
-#endif
-
 #ifndef RECOVERY_TOUCHSCREEN_SWAP_XY
-    int fb_width = gr_fb_width();
-    int fb_height = gr_fb_height();
+    int fb_width = *screen_width;
+    int fb_height = *screen_height;
 #else
     // We need to swap the scaling sizes, too
-    int fb_width = gr_fb_height();
-    int fb_height = gr_fb_width();
+    int fb_width = *screen_height;
+    int fb_height = *screen_width;
+#endif
+#ifdef _EVENT_LOGGING
+    printf("EV: p->x=%d  x-range=%d,%d  fb-width=%d\n", p->x, p->xi.minimum, p->xi.maximum, *screen_width);
 #endif
 
     *x = (p->x - p->xi.minimum) * (fb_width - 1) / (p->xi.maximum - p->xi.minimum);
@@ -325,7 +324,7 @@
 
 /* Translate a virtual key in to a real key event, if needed */
 /* Returns non-zero when the event should be consumed */
-static int vk_modify(struct ev *e, struct input_event *ev)
+static int vk_modify(struct ev *e, struct input_event *ev, int *screen_width, int *screen_height)
 {
     static int downX = -1, downY = -1;
     static int discard = 0;
@@ -545,11 +544,11 @@
     // Retrieve where the x,y position is
     if (e->p.synced & 0x03)
     {
-        vk_tp_to_screen(&e->p, &x, &y);
+        vk_tp_to_screen(&e->p, &x, &y, screen_width, screen_height);
     }
     else if (e->mt_p.synced & 0x03)
     {
-        vk_tp_to_screen(&e->mt_p, &x, &y);
+        vk_tp_to_screen(&e->mt_p, &x, &y, screen_width, screen_height);
     }
     else
     {
@@ -563,10 +562,10 @@
     x ^= y;
 #endif
 #ifdef RECOVERY_TOUCHSCREEN_FLIP_X
-    x = gr_fb_width() - x;
+    x = *screen_width - x;
 #endif
 #ifdef RECOVERY_TOUCHSCREEN_FLIP_Y
-    y = gr_fb_height() - y;
+    y = *screen_height - y;
 #endif
 
 #ifdef _EVENT_LOGGING
@@ -621,7 +620,7 @@
     return 0;
 }
 
-int ev_get(struct input_event *ev, unsigned dont_wait)
+int ev_get(struct input_event *ev, unsigned dont_wait, int *screen_width, int *screen_height)
 {
     int r;
     unsigned n;
@@ -634,7 +633,7 @@
                 if(ev_fds[n].revents & POLLIN) {
                     r = read(ev_fds[n].fd, ev, sizeof(*ev));
                     if(r == sizeof(*ev)) {
-                        if (!vk_modify(&evs[n], ev))
+                        if (!vk_modify(&evs[n], ev, screen_width, screen_height))
                             return 0;
                     }
                 }
diff --git a/minuitwrp/minui.h b/minuitwrp/minui.h
index 03e15bb..66e7f4f 100644
--- a/minuitwrp/minui.h
+++ b/minuitwrp/minui.h
@@ -57,7 +57,7 @@
 
 int ev_init(void);
 void ev_exit(void);
-int ev_get(struct input_event *ev, unsigned dont_wait);
+int ev_get(struct input_event *ev, unsigned dont_wait, int *screen_width, int *screen_height);
 
 // Resources
 
