Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
Stella
Commits
db833249
Commit
db833249
authored
Apr 03, 2019
by
thrust26
Browse files
made scanlines available in non-Blargg modes
parent
e2f5be47
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/emucore/TIASurface.cxx
View file @
db833249
...
...
@@ -97,7 +97,7 @@ void TIASurface::initialize(const Console& console, const VideoMode& mode)
// so rounding is performed to eliminate it
// This won't be 100% accurate, but non-integral scaling isn't 100%
// accurate anyway
mySLineSurface
->
setSrcSize
(
1
,
int
(
2
*
float
(
mode
.
image
.
height
())
/
mySLineSurface
->
setSrcSize
(
1
,
2
*
int
(
float
(
mode
.
image
.
height
())
/
floor
((
float
(
mode
.
image
.
height
())
/
myTIA
->
height
())
+
0.5
)));
#if 0
...
...
@@ -288,7 +288,7 @@ void TIASurface::enableNTSC(bool enable)
tia_attr
.
smoothing
=
myOSystem
.
settings
().
getBool
(
"tia.inter"
);
myTiaSurface
->
applyAttributes
();
myScanlinesEnabled
=
enable
;
myScanlinesEnabled
=
myOSystem
.
settings
().
getInt
(
"tv.scanlines"
)
>
0
;
FBSurface
::
Attributes
&
sl_attr
=
mySLineSurface
->
attributes
();
sl_attr
.
smoothing
=
myOSystem
.
settings
().
getBool
(
"tv.scaninter"
);
sl_attr
.
blending
=
myScanlinesEnabled
;
...
...
src/gui/StellaSettingsDialog.cxx
View file @
db833249
...
...
@@ -109,7 +109,7 @@ void StellaSettingsDialog::addVideoOptions(WidgetArray& wid, int& xpos, int& ypo
int
pwidth
=
font
.
getStringWidth
(
"Bad adjust"
);
myTVMode
=
new
PopUpWidget
(
this
,
font
,
xpos
,
ypos
,
pwidth
,
lineHeight
,
items
,
"TV mode "
,
lwidth
,
kTVModeChanged
);
items
,
"TV mode "
,
lwidth
);
wid
.
push_back
(
myTVMode
);
ypos
+=
lineHeight
+
VGAP
*
2
;
...
...
@@ -194,7 +194,6 @@ void StellaSettingsDialog::loadConfig()
// TV scanline intensity
myTVScanIntense
->
setValue
(
valueToLevel
(
settings
.
getInt
(
"tv.scanlines"
)));
handleTVModeChange
();
// TV phosphor blend
myTVPhosLevel
->
setValue
(
valueToLevel
(
settings
.
getInt
(
"tv.phosblend"
)));
...
...
@@ -270,8 +269,6 @@ void StellaSettingsDialog::setDefaults()
// TV phosphor blend
myTVPhosLevel
->
setValue
(
6
);
// = 45%
handleTVModeChange
();
// Load the default game properties
Properties
defaultProperties
;
const
string
&
md5
=
myGameProperties
.
get
(
Cartridge_MD5
);
...
...
@@ -296,10 +293,6 @@ void StellaSettingsDialog::handleCommand(CommandSender* sender, int cmd,
setDefaults
();
break
;
case
kTVModeChanged
:
handleTVModeChange
();
break
;
case
kScanlinesChanged
:
if
(
myTVScanIntense
->
getValue
()
==
0
)
myTVScanIntense
->
setValueLabel
(
"off"
);
...
...
@@ -400,16 +393,6 @@ void StellaSettingsDialog::loadControllerProperties(const Properties& props)
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void
StellaSettingsDialog
::
handleTVModeChange
()
{
NTSCFilter
::
Preset
preset
=
NTSCFilter
::
Preset
(
myTVMode
->
getSelectedTag
().
toInt
());
bool
scanenable
=
preset
!=
NTSCFilter
::
PRESET_OFF
;
myTVScanlines
->
setEnabled
(
scanenable
);
myTVScanIntense
->
setEnabled
(
scanenable
);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int
StellaSettingsDialog
::
levelToValue
(
int
level
)
{
...
...
src/gui/StellaSettingsDialog.hxx
View file @
db833249
...
...
@@ -43,7 +43,6 @@ class StellaSettingsDialog : public Dialog
void
addGameOptions
(
WidgetArray
&
wid
,
int
&
xpos
,
int
&
ypos
,
const
GUI
::
Font
&
font
);
void
handleCommand
(
CommandSender
*
sender
,
int
cmd
,
int
data
,
int
id
)
override
;
void
handleTVModeChange
();
// load the properties for the controller settings
void
loadControllerProperties
(
const
Properties
&
props
);
...
...
@@ -77,7 +76,6 @@ class StellaSettingsDialog : public Dialog
StaticTextWidget
*
myRightPortDetected
;
enum
{
kTVModeChanged
=
'
SStv
'
,
kScanlinesChanged
=
'
SSsc
'
,
kPhosphorChanged
=
'
SSph
'
};
...
...
src/gui/VideoDialog.cxx
View file @
db833249
...
...
@@ -540,7 +540,6 @@ void VideoDialog::setDefaults()
void
VideoDialog
::
handleTVModeChange
(
NTSCFilter
::
Preset
preset
)
{
bool
enable
=
preset
==
NTSCFilter
::
PRESET_CUSTOM
;
bool
scanenable
=
preset
!=
NTSCFilter
::
PRESET_OFF
;
myTVSharp
->
setEnabled
(
enable
);
myTVHue
->
setEnabled
(
enable
);
...
...
@@ -557,10 +556,6 @@ void VideoDialog::handleTVModeChange(NTSCFilter::Preset preset)
myCloneRGB
->
setEnabled
(
enable
);
myCloneBad
->
setEnabled
(
enable
);
myCloneCustom
->
setEnabled
(
enable
);
myTVScanLabel
->
setEnabled
(
scanenable
);
myTVScanIntense
->
setEnabled
(
scanenable
);
myTVScanInterpolate
->
setEnabled
(
scanenable
);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment