Merged revision(s) 58682-58770 from trunk/blender into soc-2013-dingto.
[blender.git] / source / blender / makesrna / intern / rna_scene.c
index 549fffcada7d7afebb815ffc58f6cc0702307738..1ad2bfb491a23858d2f173fc227e9b602e773278 100644 (file)
@@ -3144,6 +3144,13 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
                {0, NULL, 0, NULL, NULL}
        };
 
+       static EnumPropertyItem vsync_items[] = {
+               {VSYNC_OFF, "OFF", 0, "Off", "Disables vsync"},
+               {VSYNC_ON, "ON", 0, "On", "Enables vsync"},
+               {VSYNC_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", "Enables adaptive vsync (if supported)"},
+               {0, NULL, 0, NULL, NULL}
+       };
+
        static EnumPropertyItem storage_items[] = {
                {RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Chooses the best supported mode"},
                {RAS_STORE_IMMEDIATE, "IMMEDIATE", 0, "Immediate Mode", "Slowest performance, requires OpenGL (any version)"},
@@ -3170,6 +3177,11 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
        RNA_def_property_range(prop, 4, 10000);
        RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen");
        RNA_def_property_update(prop, NC_SCENE, NULL);
+
+       prop = RNA_def_property(srna, "vsync", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "vsync");
+       RNA_def_property_enum_items(prop, vsync_items);
+       RNA_def_property_ui_text(prop, "Vsync", "Change vsync settings");
        
        prop = RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "aasamples");