Missed a couple of files for the vsync commit (r58729).

This commit is contained in:
Mitchell Stokes 2013-07-29 22:36:51 +00:00
parent 29f8dfd37a
commit 620323a12c
2 changed files with 19 additions and 1 deletions

View File

@ -652,7 +652,8 @@ typedef struct GameData {
short mode, matmode;
short occlusionRes; /* resolution of occlusion Z buffer in pixel */
short physicsEngine;
short exitkey, pad;
short exitkey;
short vsync; /* Controls vsync: off, on, or adaptive (if supported) */
short ticrate, maxlogicstep, physubstep, maxphystep;
short obstacleSimulation;
short raster_storage;
@ -688,6 +689,11 @@ typedef struct GameData {
#define RAS_STORE_VA 2
#define RAS_STORE_VBO 3
/* vsync */
#define VSYNC_OFF 0
#define VSYNC_ON 1
#define VSYNC_ADAPTIVE 2
/* GameData.flag */
#define GAME_RESTRICT_ANIM_UPDATES (1 << 0)
#define GAME_ENABLE_ALL_FRAMES (1 << 1)

View File

@ -3126,6 +3126,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)"},
@ -3152,6 +3159,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");