Add option for 50Hz video.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
7c90b040ef
commit
eb3c11c672
4 changed files with 17 additions and 1 deletions
|
@ -213,6 +213,7 @@ void getAppleWinPreferences(PreferenceData & data)
|
||||||
data.videoType = GetVideoType();
|
data.videoType = GetVideoType();
|
||||||
data.scanLines = IsVideoStyle(VS_HALF_SCANLINES);
|
data.scanLines = IsVideoStyle(VS_HALF_SCANLINES);
|
||||||
data.verticalBlend = IsVideoStyle(VS_COLOR_VERTICAL_BLEND);
|
data.verticalBlend = IsVideoStyle(VS_COLOR_VERTICAL_BLEND);
|
||||||
|
data.hz50 = GetVideoRefreshRate() == VR_50HZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAppleWinPreferences(const PreferenceData & currentData, const PreferenceData & newData)
|
void setAppleWinPreferences(const PreferenceData & currentData, const PreferenceData & newData)
|
||||||
|
@ -271,7 +272,8 @@ void setAppleWinPreferences(const PreferenceData & currentData, const Preference
|
||||||
RegSaveString(TEXT(REG_CONFIG), REGVALUE_SAVESTATE_FILENAME, 1, name);
|
RegSaveString(TEXT(REG_CONFIG), REGVALUE_SAVESTATE_FILENAME, 1, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentData.videoType != newData.videoType || currentData.scanLines != newData.scanLines || currentData.verticalBlend != newData.verticalBlend)
|
if (currentData.videoType != newData.videoType || currentData.scanLines != newData.scanLines || currentData.verticalBlend != newData.verticalBlend
|
||||||
|
|| currentData.hz50 != newData.hz50)
|
||||||
{
|
{
|
||||||
const VideoType_e videoType = VideoType_e(newData.videoType);
|
const VideoType_e videoType = VideoType_e(newData.videoType);
|
||||||
SetVideoType(videoType);
|
SetVideoType(videoType);
|
||||||
|
@ -283,6 +285,9 @@ void setAppleWinPreferences(const PreferenceData & currentData, const Preference
|
||||||
videoStyle = VideoStyle_e(videoStyle | VS_COLOR_VERTICAL_BLEND);
|
videoStyle = VideoStyle_e(videoStyle | VS_COLOR_VERTICAL_BLEND);
|
||||||
SetVideoStyle(videoStyle);
|
SetVideoStyle(videoStyle);
|
||||||
|
|
||||||
|
const VideoRefreshRate_e videoRefreshRate = newData.hz50 ? VR_50HZ : VR_60HZ;
|
||||||
|
SetVideoRefreshRate(videoRefreshRate);
|
||||||
|
|
||||||
Config_Save_Video();
|
Config_Save_Video();
|
||||||
VideoReinitialize();
|
VideoReinitialize();
|
||||||
VideoRedrawScreen();
|
VideoRedrawScreen();
|
||||||
|
|
|
@ -33,6 +33,7 @@ struct PreferenceData
|
||||||
bool mouseInSlot4;
|
bool mouseInSlot4;
|
||||||
bool cpmInSlot5;
|
bool cpmInSlot5;
|
||||||
bool hdInSlot7;
|
bool hdInSlot7;
|
||||||
|
bool hz50;
|
||||||
|
|
||||||
bool enhancedSpeed;
|
bool enhancedSpeed;
|
||||||
|
|
||||||
|
|
|
@ -198,6 +198,8 @@ void Preferences::setData(const PreferenceData & data)
|
||||||
ui->video_type->setCurrentIndex(data.videoType);
|
ui->video_type->setCurrentIndex(data.videoType);
|
||||||
ui->scan_lines->setChecked(data.scanLines);
|
ui->scan_lines->setChecked(data.scanLines);
|
||||||
ui->vertical_blend->setChecked(data.verticalBlend);
|
ui->vertical_blend->setChecked(data.verticalBlend);
|
||||||
|
|
||||||
|
ui->hz_50->setChecked(data.hz50);
|
||||||
}
|
}
|
||||||
|
|
||||||
PreferenceData Preferences::getData() const
|
PreferenceData Preferences::getData() const
|
||||||
|
@ -233,6 +235,7 @@ PreferenceData Preferences::getData() const
|
||||||
data.videoType = ui->video_type->currentIndex();
|
data.videoType = ui->video_type->currentIndex();
|
||||||
data.scanLines = ui->scan_lines->isChecked();
|
data.scanLines = ui->scan_lines->isChecked();
|
||||||
data.verticalBlend = ui->vertical_blend->isChecked();
|
data.verticalBlend = ui->vertical_blend->isChecked();
|
||||||
|
data.hz50 = ui->hz_50->isChecked();
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -498,6 +498,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QCheckBox" name="hz_50">
|
||||||
|
<property name="text">
|
||||||
|
<string>50 Hz</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Reference in a new issue