瀏覽代碼

Backed out changeset 4a45d1a30d25

kmsdrm: Fake KMSDRM_SetDisplayMode() is needed for some programs after all.
Manuel Alfayate Corchete 5 年之前
父節點
當前提交
01b0cf1c90
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      src/video/kmsdrm/SDL_kmsdrmvideo.c

+ 14 - 0
src/video/kmsdrm/SDL_kmsdrmvideo.c

@@ -764,6 +764,7 @@ KMSDRM_CreateDevice(int devindex)
     device->VideoInit = KMSDRM_VideoInit;
     device->VideoQuit = KMSDRM_VideoQuit;
     device->GetDisplayModes = KMSDRM_GetDisplayModes;
+    device->SetDisplayMode = KMSDRM_SetDisplayMode;
     device->CreateSDLWindow = KMSDRM_CreateWindow;
     device->CreateSDLWindowFrom = KMSDRM_CreateWindowFrom;
     device->SetWindowTitle = KMSDRM_SetWindowTitle;
@@ -1549,6 +1550,19 @@ KMSDRM_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
     }
 }
 
+int
+KMSDRM_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode)
+{
+    /************************************************************************/
+    /* DO NOT add dynamic videomode changes. It makes NO SENSE, since the   */
+    /* PRIMARY PLANE and the CRTC can be used to scale image, so any window */
+    /* will appear fullscren with AR correction with NO extra video memory  */
+    /* bandwidth usage.                                                     */
+    /************************************************************************/    
+
+    return 0;
+}
+
 int
 KMSDRM_CreateWindow(_THIS, SDL_Window * window)
 {