forked from speed-dreams/speed-dreams-code
- wide Robert's patch
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6793 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: bd26402026d3399608d25a9c30345ca7a112aecd Former-commit-id: aa82c598411865fe4f3e55d69e5c60a41ba1a0a4
This commit is contained in:
parent
74a4b45f9a
commit
e5f9ae1d9f
7 changed files with 14 additions and 6 deletions
|
@ -124,6 +124,7 @@
|
||||||
|
|
||||||
#define GR_SCT_MONITOR "Monitor"
|
#define GR_SCT_MONITOR "Monitor"
|
||||||
#define GR_ATT_MONITOR "monitor type"
|
#define GR_ATT_MONITOR "monitor type"
|
||||||
|
#define GR_VAL_MONITOR_21BY9 "21:9"
|
||||||
#define GR_VAL_MONITOR_16BY9 "16:9"
|
#define GR_VAL_MONITOR_16BY9 "16:9"
|
||||||
#define GR_VAL_MONITOR_4BY3 "4:3"
|
#define GR_VAL_MONITOR_4BY3 "4:3"
|
||||||
#define GR_VAL_MONITOR_NONE "none"
|
#define GR_VAL_MONITOR_NONE "none"
|
||||||
|
|
|
@ -108,6 +108,8 @@ static tScreenSize ADefScreenSizes[] =
|
||||||
{ 1800, 1440 },
|
{ 1800, 1440 },
|
||||||
{ 1920, 1080 },
|
{ 1920, 1080 },
|
||||||
{ 1920, 1200 },
|
{ 1920, 1200 },
|
||||||
|
{ 2560, 1080 },
|
||||||
|
{ 2560, 1440 },
|
||||||
{ 3840, 2160 }
|
{ 3840, 2160 }
|
||||||
};
|
};
|
||||||
static const int NDefScreenSizes =
|
static const int NDefScreenSizes =
|
||||||
|
|
|
@ -2462,6 +2462,8 @@ void SDCameras::loadSpanValues()
|
||||||
const char *pszMonitorType =
|
const char *pszMonitorType =
|
||||||
GfParmGetStr(grHandle, GR_SCT_GRAPHIC, GR_ATT_MONITOR, GR_VAL_MONITOR_16BY9);
|
GfParmGetStr(grHandle, GR_SCT_GRAPHIC, GR_ATT_MONITOR, GR_VAL_MONITOR_16BY9);
|
||||||
|
|
||||||
|
if (strcmp(pszMonitorType, GR_VAL_MONITOR_21BY9) == 0)
|
||||||
|
spanaspect = 2.3704f;
|
||||||
if (strcmp(pszMonitorType, GR_VAL_MONITOR_16BY9) == 0)
|
if (strcmp(pszMonitorType, GR_VAL_MONITOR_16BY9) == 0)
|
||||||
spanaspect = 1.7777f;
|
spanaspect = 1.7777f;
|
||||||
if (strcmp(pszMonitorType, GR_VAL_MONITOR_4BY3) == 0)
|
if (strcmp(pszMonitorType, GR_VAL_MONITOR_4BY3) == 0)
|
||||||
|
|
|
@ -1949,6 +1949,8 @@ grCamCreateSceneCameraList(class cGrScreen *myscreen, tGrCamHead *cams,
|
||||||
const char *pszMonitorType =
|
const char *pszMonitorType =
|
||||||
GfParmGetStr(grHandle, GR_SCT_GRAPHIC, GR_ATT_MONITOR, GR_VAL_MONITOR_16BY9);
|
GfParmGetStr(grHandle, GR_SCT_GRAPHIC, GR_ATT_MONITOR, GR_VAL_MONITOR_16BY9);
|
||||||
|
|
||||||
|
if (strcmp(pszMonitorType, GR_VAL_MONITOR_21BY9) == 0)
|
||||||
|
spanaspect = 2.3704;
|
||||||
if (strcmp(pszMonitorType, GR_VAL_MONITOR_16BY9) == 0)
|
if (strcmp(pszMonitorType, GR_VAL_MONITOR_16BY9) == 0)
|
||||||
spanaspect = 1.7777;
|
spanaspect = 1.7777;
|
||||||
if (strcmp(pszMonitorType, GR_VAL_MONITOR_4BY3) == 0)
|
if (strcmp(pszMonitorType, GR_VAL_MONITOR_4BY3) == 0)
|
||||||
|
|
|
@ -47,7 +47,7 @@ static const char* ShadersValues[] = { GR_ATT_AGR_NULL, GR_ATT_AGR_LITTLE, GR_AT
|
||||||
static const int NbShadersValues = sizeof(ShadersValues) / sizeof(ShadersValues[0]);
|
static const int NbShadersValues = sizeof(ShadersValues) / sizeof(ShadersValues[0]);
|
||||||
static const char* SpansplitValues[] = { GR_VAL_NO, GR_VAL_YES };
|
static const char* SpansplitValues[] = { GR_VAL_NO, GR_VAL_YES };
|
||||||
static const int NbSpansplitValues = sizeof(SpansplitValues) / sizeof(SpansplitValues[0]);
|
static const int NbSpansplitValues = sizeof(SpansplitValues) / sizeof(SpansplitValues[0]);
|
||||||
static const char* MonitorValues[] = { GR_VAL_MONITOR_16BY9, GR_VAL_MONITOR_4BY3, GR_VAL_MONITOR_NONE };
|
static const char* MonitorValues[] = { GR_VAL_MONITOR_16BY9, GR_VAL_MONITOR_4BY3, GR_VAL_MONITOR_21BY9, GR_VAL_MONITOR_NONE };
|
||||||
static const int NbMonitorValues = sizeof(MonitorValues) / sizeof(MonitorValues[0]);
|
static const int NbMonitorValues = sizeof(MonitorValues) / sizeof(MonitorValues[0]);
|
||||||
|
|
||||||
static void *ScrHandle = NULL;
|
static void *ScrHandle = NULL;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
|
|
||||||
// Some consts.
|
// Some consts.
|
||||||
static const char* AMonitorTypes[MonitorMenu::nMonitorTypes] = { "4:3", "16:9" };
|
static const char* AMonitorTypes[MonitorMenu::nMonitorTypes] = { "4:3", "16:9", "21:9" };
|
||||||
static const char* ASpanSplits[MonitorMenu::nSpanSplits] = { "Disabled", "Enabled" };
|
static const char* ASpanSplits[MonitorMenu::nSpanSplits] = { "Disabled", "Enabled" };
|
||||||
|
|
||||||
static float _nBezelComp;
|
static float _nBezelComp;
|
||||||
|
@ -132,10 +132,11 @@ void MonitorMenu::loadSettings()
|
||||||
void* grHandle =
|
void* grHandle =
|
||||||
GfParmReadFile(ossConfFile.str().c_str(), GFPARM_RMODE_STD | GFPARM_RMODE_CREAT);
|
GfParmReadFile(ossConfFile.str().c_str(), GFPARM_RMODE_STD | GFPARM_RMODE_CREAT);
|
||||||
|
|
||||||
// Monitor Type : 4:3 or 16:9
|
// Monitor Type : 4:3, 16:9 or 21:9
|
||||||
const char *pszMonitorType =
|
const char *pszMonitorType =
|
||||||
GfParmGetStr(grHandle, GR_SCT_MONITOR, GR_ATT_MONITOR, GR_VAL_MONITOR_16BY9);
|
GfParmGetStr(grHandle, GR_SCT_MONITOR, GR_ATT_MONITOR, GR_VAL_MONITOR_16BY9);
|
||||||
_eMonitorType = strcmp(pszMonitorType, GR_VAL_MONITOR_16BY9) ? e4by3: e16by9;
|
_eMonitorType = strcmp(pszMonitorType, GR_VAL_MONITOR_4BY3) == 0 ? e4by3 :
|
||||||
|
strcmp(pszMonitorType, GR_VAL_MONITOR_21BY9) == 0 ? e21by9 : e16by9;
|
||||||
|
|
||||||
// Span Split Screens
|
// Span Split Screens
|
||||||
const char *pszSpanSplit =
|
const char *pszSpanSplit =
|
||||||
|
@ -167,7 +168,7 @@ void MonitorMenu::storeSettings() const
|
||||||
GfParmReadFile(ossConfFile.str().c_str(), GFPARM_RMODE_STD | GFPARM_RMODE_CREAT);
|
GfParmReadFile(ossConfFile.str().c_str(), GFPARM_RMODE_STD | GFPARM_RMODE_CREAT);
|
||||||
|
|
||||||
const char* pszMonitorType =
|
const char* pszMonitorType =
|
||||||
(_eMonitorType == e16by9) ? GR_VAL_MONITOR_16BY9 : GR_VAL_MONITOR_4BY3;
|
(_eMonitorType == e4by3) ? GR_VAL_MONITOR_4BY3 : (_eMonitorType == e21by9) ? GR_VAL_MONITOR_21BY9 : GR_VAL_MONITOR_16BY9;
|
||||||
GfParmSetStr(grHandle, GR_SCT_MONITOR, GR_ATT_MONITOR, pszMonitorType);
|
GfParmSetStr(grHandle, GR_SCT_MONITOR, GR_ATT_MONITOR, pszMonitorType);
|
||||||
|
|
||||||
const char* pszSpanSplit =
|
const char* pszSpanSplit =
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
MonitorMenu();
|
MonitorMenu();
|
||||||
bool initialize(void* pPreviousMenu);
|
bool initialize(void* pPreviousMenu);
|
||||||
|
|
||||||
enum EMonitorType { e4by3 = 0, e16by9 = 1, nMonitorTypes };
|
enum EMonitorType { e4by3 = 0, e16by9 = 1, e21by9 = 2, nMonitorTypes };
|
||||||
enum ESpanSplit { eDisabled = 0, eEnabled = 1, nSpanSplits };
|
enum ESpanSplit { eDisabled = 0, eEnabled = 1, nSpanSplits };
|
||||||
|
|
||||||
void setMonitorType(EMonitorType eMode);
|
void setMonitorType(EMonitorType eMode);
|
||||||
|
|
Loading…
Reference in a new issue