shithub: choc

Download patch

ref: 970a54d1cf2a980fd3bb5412d2e0cfc9ae8898ec
parent: 1430facdb3ae25a92d515bc1daf71c860ef20f1e
author: Simon Howard <[email protected]>
date: Thu Jun 4 17:14:42 EDT 2015

Fix botched merge.

I missed some of the conflicts in i_video.c.

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -435,7 +435,6 @@
 
 static int TranslateKey(SDL_Keysym *sym)
 {
-<<<<<<< HEAD
     int scancode = sym->scancode;
 
     switch (scancode)
@@ -447,92 +446,7 @@
         case SDL_SCANCODE_LSHIFT:
         case SDL_SCANCODE_RSHIFT:
             return KEY_RSHIFT;
-=======
-    switch(sym->sym)
-    {
-      case SDLK_LEFT:	return KEY_LEFTARROW;
-      case SDLK_RIGHT:	return KEY_RIGHTARROW;
-      case SDLK_DOWN:	return KEY_DOWNARROW;
-      case SDLK_UP:	return KEY_UPARROW;
-      case SDLK_ESCAPE:	return KEY_ESCAPE;
-      case SDLK_RETURN:	return KEY_ENTER;
-      case SDLK_TAB:	return KEY_TAB;
-      case SDLK_F1:	return KEY_F1;
-      case SDLK_F2:	return KEY_F2;
-      case SDLK_F3:	return KEY_F3;
-      case SDLK_F4:	return KEY_F4;
-      case SDLK_F5:	return KEY_F5;
-      case SDLK_F6:	return KEY_F6;
-      case SDLK_F7:	return KEY_F7;
-      case SDLK_F8:	return KEY_F8;
-      case SDLK_F9:	return KEY_F9;
-      case SDLK_F10:	return KEY_F10;
-      case SDLK_F11:	return KEY_F11;
-      case SDLK_F12:	return KEY_F12;
-      case SDLK_PRINT:  return KEY_PRTSCR;
 
-      case SDLK_BACKSPACE: return KEY_BACKSPACE;
-      case SDLK_DELETE:	return KEY_DEL;
-
-      case SDLK_PAUSE:	return KEY_PAUSE;
-
-      case SDLK_EQUALS: return KEY_EQUALS;
-
-      case SDLK_MINUS:          return KEY_MINUS;
-
-      case SDLK_LSHIFT:
-      case SDLK_RSHIFT:
-	return KEY_RSHIFT;
-	
-      case SDLK_LCTRL:
-      case SDLK_RCTRL:
-	return KEY_RCTRL;
-	
-      case SDLK_LALT:
-      case SDLK_RALT:
-      case SDLK_LMETA:
-      case SDLK_RMETA:
-        return KEY_RALT;
-
-      case SDLK_CAPSLOCK: return KEY_CAPSLOCK;
-      case SDLK_SCROLLOCK: return KEY_SCRLCK;
-      case SDLK_NUMLOCK: return KEY_NUMLOCK;
-
-      case SDLK_KP0: return KEYP_0;
-      case SDLK_KP1: return KEYP_1;
-      case SDLK_KP2: return KEYP_2;
-      case SDLK_KP3: return KEYP_3;
-      case SDLK_KP4: return KEYP_4;
-      case SDLK_KP5: return KEYP_5;
-      case SDLK_KP6: return KEYP_6;
-      case SDLK_KP7: return KEYP_7;
-      case SDLK_KP8: return KEYP_8;
-      case SDLK_KP9: return KEYP_9;
-
-      case SDLK_KP_PERIOD:   return KEYP_PERIOD;
-      case SDLK_KP_MULTIPLY: return KEYP_MULTIPLY;
-      case SDLK_KP_PLUS:     return KEYP_PLUS;
-      case SDLK_KP_MINUS:    return KEYP_MINUS;
-      case SDLK_KP_DIVIDE:   return KEYP_DIVIDE;
-      case SDLK_KP_EQUALS:   return KEYP_EQUALS;
-      case SDLK_KP_ENTER:    return KEYP_ENTER;
-
-      case SDLK_HOME: return KEY_HOME;
-      case SDLK_INSERT: return KEY_INS;
-      case SDLK_END: return KEY_END;
-      case SDLK_PAGEUP: return KEY_PGUP;
-      case SDLK_PAGEDOWN: return KEY_PGDN;
-
-#ifdef SDL_HAVE_APP_KEYS
-        case SDLK_APP1:        return KEY_F1;
-        case SDLK_APP2:        return KEY_F2;
-        case SDLK_APP3:        return KEY_F3;
-        case SDLK_APP4:        return KEY_F4;
-        case SDLK_APP5:        return KEY_F5;
-        case SDLK_APP6:        return KEY_F6;
-#endif
->>>>>>> master
-
         case SDL_SCANCODE_LALT:
             return KEY_LALT;
 
@@ -968,13 +882,8 @@
         // because we're at an end of level intermission screen, for
         // example.
 
-<<<<<<< HEAD
         SDL_GetWindowSize(screen, &screen_w, &screen_h);
         SDL_WarpMouseInWindow(screen, screen_w - 16, screen_h - 16);
-=======
-        SDL_WarpMouse(screen->w - 16, screen->h - 16);
-        SDL_PumpEvents();
->>>>>>> master
         SDL_GetRelativeMouseState(NULL, NULL);
     }
 
@@ -2025,15 +1934,6 @@
         I_Error("Failed to initialize video: %s", SDL_GetError());
     }
 
-<<<<<<< HEAD
-=======
-    // Set up title and icon.  Windows cares about the ordering; this
-    // has to be done before the call to SDL_SetVideoMode.
-
-    I_InitWindowTitle();
-    I_InitWindowIcon();
-
->>>>>>> master
     // Warning to OS X users... though they might never see it :(
 #ifdef __MACOSX__
     if (fullscreen)
@@ -2152,24 +2052,6 @@
 
 void I_BindVideoVariables(void)
 {
-<<<<<<< HEAD
-    M_BindVariable("use_mouse",                 &usemouse);
-    M_BindVariable("autoadjust_video_settings", &autoadjust_video_settings);
-    M_BindVariable("fullscreen",                &fullscreen);
-    M_BindVariable("aspect_ratio_correct",      &aspect_ratio_correct);
-    M_BindVariable("startup_delay",             &startup_delay);
-    M_BindVariable("screen_width",              &screen_width);
-    M_BindVariable("screen_height",             &screen_height);
-    M_BindVariable("grabmouse",                 &grabmouse);
-    M_BindVariable("mouse_acceleration",        &mouse_acceleration);
-    M_BindVariable("mouse_threshold",           &mouse_threshold);
-    M_BindVariable("video_driver",              &video_driver);
-    M_BindVariable("window_position",           &window_position);
-    M_BindVariable("usegamma",                  &usegamma);
-    M_BindVariable("vanilla_keyboard_mapping",  &vanilla_keyboard_mapping);
-    M_BindVariable("novert",                    &novert);
-    M_BindVariable("png_screenshots",           &png_screenshots);
-=======
     M_BindIntVariable("use_mouse",                 &usemouse);
     M_BindIntVariable("autoadjust_video_settings", &autoadjust_video_settings);
     M_BindIntVariable("fullscreen",                &fullscreen);
@@ -2177,7 +2059,6 @@
     M_BindIntVariable("startup_delay",             &startup_delay);
     M_BindIntVariable("screen_width",              &screen_width);
     M_BindIntVariable("screen_height",             &screen_height);
-    M_BindIntVariable("screen_bpp",                &screen_bpp);
     M_BindIntVariable("grabmouse",                 &grabmouse);
     M_BindFloatVariable("mouse_acceleration",      &mouse_acceleration);
     M_BindIntVariable("mouse_threshold",           &mouse_threshold);
@@ -2187,7 +2068,6 @@
     M_BindIntVariable("vanilla_keyboard_mapping",  &vanilla_keyboard_mapping);
     M_BindIntVariable("novert",                    &novert);
     M_BindIntVariable("png_screenshots",           &png_screenshots);
->>>>>>> master
 
     // Disable fullscreen by default on OS X, as there is an SDL bug
     // where some old versions of OS X (<= Snow Leopard) crash.