summaryrefslogtreecommitdiff
path: root/app-emulation/wine/files/wined3d.diff
blob: d27d4d71a1fbd3ba3aa04b79c16eddb91d7a478b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
diff -Naur wine.old/dlls/wined3d/directx.c wine/dlls/wined3d/directx.c
--- wine.old/dlls/wined3d/directx.c	2008-11-07 18:01:46.000000000 +0100
+++ wine/dlls/wined3d/directx.c	2008-11-07 18:02:05.000000000 +0100
@@ -4247,8 +4247,19 @@
             goto nogl_adapter;
         }
 
-        Adapters[0].driver = "Display";
-        Adapters[0].description = "Direct3D HAL";
+        /* Use VideoDriver registry setting when set */
+        if(wined3d_settings.video_driver) {
+            Adapters[0].driver = wined3d_settings.video_driver;
+        } else {
+            Adapters[0].driver = "Display";
+        }
+
+        /* Use VideoDescription registry setting when set */
+        if(wined3d_settings.video_description) {
+            Adapters[0].description = wined3d_settings.video_description;
+        } else {
+            Adapters[0].description = "Direct3D HAL";
+        }
 
         /* Use the VideoRamSize registry setting when set */
         if(wined3d_settings.emulated_textureram)
@@ -4366,8 +4377,22 @@
     Adapters[0].monitorPoint.x = -1;
     Adapters[0].monitorPoint.y = -1;
 
-    Adapters[0].driver = "Display";
-    Adapters[0].description = "WineD3D DirectDraw Emulation";
+
+    /* Use VideoDriver registry setting when set */
+    if(wined3d_settings.video_driver) {
+        Adapters[0].driver = wined3d_settings.video_driver;
+    } else {
+        Adapters[0].driver = "Display";
+    }
+
+    /* Use VideoDescription registry setting when set */
+    if(wined3d_settings.video_description) {
+        Adapters[0].description = wined3d_settings.video_description;
+    } else {
+        Adapters[0].description = "WineD3D DirectDraw Emulation";
+    }
+
+    /* Use VideoRamSize registry setting when set */
     if(wined3d_settings.emulated_textureram) {
         Adapters[0].TextureRam = wined3d_settings.emulated_textureram;
     } else {
diff -Naur wine.old/dlls/wined3d/wined3d_main.c wine/dlls/wined3d/wined3d_main.c
--- wine.old/dlls/wined3d/wined3d_main.c	2008-10-24 15:13:40.000000000 +0200
+++ wine/dlls/wined3d/wined3d_main.c	2008-11-07 17:48:16.000000000 +0100
@@ -264,6 +264,18 @@
                     wined3d_settings.allow_multisampling = TRUE;
                 }
             }
+            if ( !get_config_key( hkey, appkey, "VideoDriver", buffer, size) )
+            {
+                TRACE("Video Driver name: %s\n",buffer);
+                wined3d_settings.video_driver = HeapAlloc(GetProcessHeap(), 0, strlen(buffer) + 1);
+                if(wined3d_settings.video_driver ) strcpy(wined3d_settings.video_driver, buffer);
+            }
+            if ( !get_config_key( hkey, appkey, "VideoDescription", buffer, size) )
+            {
+                TRACE("Video Description: %s\n",buffer);
+                wined3d_settings.video_description = HeapAlloc(GetProcessHeap(), 0, strlen(buffer) + 1);
+                if(wined3d_settings.video_description ) strcpy(wined3d_settings.video_description, buffer);
+            }
        }
        if (wined3d_settings.vs_mode == VS_HW)
            TRACE("Allow HW vertex shaders\n");
diff -Naur wine.old/dlls/wined3d/wined3d_private.h wine/dlls/wined3d/wined3d_private.h
--- wine.old/dlls/wined3d/wined3d_private.h	2008-10-28 16:02:51.000000000 +0100
+++ wine/dlls/wined3d/wined3d_private.h	2008-11-07 17:56:42.000000000 +0100
@@ -201,6 +201,8 @@
 /* Memory tracking and object counting */
   unsigned int emulated_textureram;
   char *logo;
+  char *video_driver;
+  char *video_description;
   int allow_multisampling;
 } wined3d_settings_t;