summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2009-07-24 10:49:50 -0700
committerAaron Plattner <aplattner@nvidia.com>2009-07-24 10:49:50 -0700
commitf10bcc7788fceb14232eb6d71885379fdd9d3ccc (patch)
tree52effe0cd0348e7028726723c8372721dc20d2de
parentd6a4e693cb1b75bd45c27a8847da7ab46e1b7d6a (diff)
190.18190.18
-rw-r--r--src/gtk+-2.x/ctkgpu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gtk+-2.x/ctkgpu.c b/src/gtk+-2.x/ctkgpu.c
index ea10438..316d11d 100644
--- a/src/gtk+-2.x/ctkgpu.c
+++ b/src/gtk+-2.x/ctkgpu.c
@@ -290,8 +290,19 @@ GtkWidget* ctk_gpu_new(
if (pData[0] == 0) {
screens = g_strdup("None");
} else {
+ NvCtrlAttributeHandle *screen_handle;
+
if (xinerama_enabled) {
screens = g_strdup("Screen 0 (Xinerama)");
+ /* XXX Use the only screen handle we have.
+ * This is currently OK since we only
+ * query xinerama attributes with this
+ * handle below. If we needed to query
+ * a screen-specific attribute below,
+ * then we would need to get a handle
+ * for the correct screen instead.
+ */
+ screen_handle = t[0].h;
} else {
for (i = 1; i <= pData[0]; i++) {
if (screens) {
@@ -303,9 +314,10 @@ GtkWidget* ctk_gpu_new(
g_free(screens);
screens = tmp_str;
}
+ screen_handle = t[pData[1]].h;
}
- ret = NvCtrlGetAttribute(t[pData[1]].h,
+ ret = NvCtrlGetAttribute(screen_handle,
NV_CTRL_SHOW_SLI_HUD,
&tmp);
if (ret == NvCtrlSuccess) {