aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/modes/xf86Modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/modes/xf86Modes.c')
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Modes.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.c b/xorg-server/hw/xfree86/modes/xf86Modes.c
index 2a6d26756..c4a3eb0a3 100644
--- a/xorg-server/hw/xfree86/modes/xf86Modes.c
+++ b/xorg-server/hw/xfree86/modes/xf86Modes.c
@@ -191,6 +191,21 @@ xf86SetModeCrtc(DisplayModePtr p, int adjustFlags)
}
/**
+ * Fills in a copy of mode, removing all stale pointer references.
+ * xf86ModesEqual will return true when comparing with original mode.
+ */
+void
+xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec *mode)
+{
+ *intern = *mode;
+ intern->prev = intern->next = NULL;
+ intern->name = NULL;
+ intern->PrivSize = 0;
+ intern->PrivFlags = 0;
+ intern->Private = NULL;
+}
+
+/**
* Allocates and returns a copy of pMode, including pointers within pMode.
*/
DisplayModePtr