 +}
 diff -ruwN source/src/video/orbital/SDL_orbitalvideo.h source-new/src/video/orbital/SDL_orbitalvideo.h
 --- source/src/video/orbital/SDL_orbitalvideo.h	1969-12-31 17:00:00.000000000 -0700
-+++ source-new/src/video/orbital/SDL_orbitalvideo.h	2019-08-12 13:22:05.603878968 -0600
-@@ -0,0 +1,39 @@
++++ source-new/src/video/orbital/SDL_orbitalvideo.h	2019-08-12 14:06:11.392352905 -0600
+@@ -0,0 +1,43 @@
 +/*
 +    SDL - Simple DirectMedia Layer
 +    Copyright (C) 1997-2012 Sam Lantinga

+static int last_x = 0;
+static int last_y = 0;
+
+/* Variable for mouse relative processing */
+static int mouse_relative = 0;
+
+/* Check to see if we need to enter or leave mouse relative mode */
+
+void ORBITAL_CheckMouseMode(_THIS)
+{
+    if (!this->hidden->window) {
+        return;
+    }
+
+    /* If the mouse is hidden and input is grabbed, we use relative mode */
+    if ( !(SDL_cursorstate & CURSOR_VISIBLE) &&
+        (this->input_grab != SDL_GRAB_OFF) ) {
+        if (!mouse_relative) {
+            orb_window_set_mouse_relative(this->hidden->window, true);
+        }
+        mouse_relative = 1;
+    } else {
+        if (mouse_relative) {
+            orb_window_set_mouse_relative(this->hidden->window, false);
+        }
+        mouse_relative = 0;
+    }
+}
+
+/* Current grab mode */
+static SDL_GrabMode grab_mode = SDL_GRAB_OFF;
+
+SDL_GrabMode ORBITAL_GrabInput(_THIS, SDL_GrabMode mode) {
+    if (this->hidden->window) {
+        switch (mode) {
+        case SDL_GRAB_OFF:
+            orb_window_set_mouse_grab(this->hidden->window, false);
+            grab_mode = SDL_GRAB_OFF;
+            break;
+        case SDL_GRAB_ON:
+            orb_window_set_mouse_grab(this->hidden->window, true);
+            grab_mode = SDL_GRAB_ON;
+            break;
+        default:
+            break;
+        }
+    }
+    return(grab_mode);
+}
+
+void ORBITAL_PumpEvents(_THIS)
+{
+    SDL_keysym keysym;
+
+    if (!this->hidden->window) {
+        return;
+    }
+
+    void* event_iter = orb_window_events(this->hidden->window);
+    OrbEventOption oeo = orb_events_next(event_iter);
+
+    while (oeo.tag != OrbEventOption_None) {
+        switch (oeo.tag) {
+            case OrbEventOption_Key:
+                keysym.unicode = oeo.key.character;

 	/* Allow ourselves to be asynchronously cancelled */
diff -ruwN source/src/video/orbital/SDL_orbitalevents.c source-new/src/video/orbital/SDL_orbitalevents.c
--- source/src/video/orbital/SDL_orbitalevents.c	1969-12-31 17:00:00.000000000 -0700
+++ source-new/src/video/orbital/SDL_orbitalevents.c	2019-08-12 14:34:59.125356217 -0600
@@ -0,0 +1,242 @@
+/*
+    SDL - Simple DirectMedia Layer
+    Copyright (C) 1997-2012 Sam Lantinga
