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
e2f5be47
Commit
e2f5be47
authored
Apr 02, 2019
by
thrust26
Browse files
Phosphor and scanlines levels: 0 displayed as 'off'
parent
19148d4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/emucore/EventHandler.cxx
View file @
e2f5be47
...
...
@@ -362,7 +362,7 @@ void EventHandler::handleEvent(Event::Type event, bool pressed)
////////////////////////////////////////////////////////////////////////
case
Event
::
Fry
:
if
(
myPKeyHandler
->
useCtrlKey
())
myFryingFlag
=
bool
(
pressed
)
;
if
(
myPKeyHandler
->
useCtrlKey
())
myFryingFlag
=
pressed
;
return
;
case
Event
::
VolumeDecrease
:
...
...
src/gui/StellaSettingsDialog.cxx
View file @
e2f5be47
...
...
@@ -112,7 +112,7 @@ void StellaSettingsDialog::addVideoOptions(WidgetArray& wid, int& xpos, int& ypo
items
,
"TV mode "
,
lwidth
,
kTVModeChanged
);
wid
.
push_back
(
myTVMode
);
ypos
+=
lineHeight
+
VGAP
*
2
;
lwidth
=
font
.
getStringWidth
(
"Intensity "
);
swidth
=
font
.
getMaxCharWidth
()
*
10
;
...
...
@@ -120,21 +120,21 @@ void StellaSettingsDialog::addVideoOptions(WidgetArray& wid, int& xpos, int& ypo
myTVScanlines
=
new
StaticTextWidget
(
this
,
font
,
xpos
,
ypos
+
1
,
"Scanlines:"
);
ypos
+=
lineHeight
;
myTVScanIntense
=
new
SliderWidget
(
this
,
font
,
xpos
+
INDENT
,
ypos
-
1
,
swidth
,
lineHeight
,
"Intensity "
,
lwidth
,
0
,
fontWidth
*
2
);
myTVScanIntense
->
setMinValue
(
0
);
myTVScanIntense
->
setMaxValue
(
10
);
myTVScanIntense
->
setTickmarkInterval
(
2
);
"Intensity "
,
lwidth
,
kScanlinesChanged
,
fontWidth
*
3
);
myTVScanIntense
->
setMinValue
(
0
);
myTVScanIntense
->
setMaxValue
(
10
);
myTVScanIntense
->
setTickmarkInterval
(
2
);
wid
.
push_back
(
myTVScanIntense
);
ypos
+=
lineHeight
+
VGAP
;
ypos
+=
lineHeight
+
VGAP
;
// TV Phosphor effect
new
StaticTextWidget
(
this
,
font
,
xpos
,
ypos
+
1
,
"Phosphor effect:"
);
ypos
+=
lineHeight
;
// TV Phosphor blend level
myTVPhosLevel
=
new
SliderWidget
(
this
,
font
,
xpos
+
INDENT
,
ypos
-
1
,
swidth
,
lineHeight
,
"Blend "
,
lwidth
,
0
,
fontWidth
*
2
);
myTVPhosLevel
->
setMinValue
(
0
);
myTVPhosLevel
->
setMaxValue
(
10
);
myTVPhosLevel
->
setTickmarkInterval
(
2
);
wid
.
push_back
(
myTVPhosLevel
);
"Blend "
,
lwidth
,
kPhosphorChanged
,
fontWidth
*
3
);
myTVPhosLevel
->
setMinValue
(
0
);
myTVPhosLevel
->
setMaxValue
(
10
);
myTVPhosLevel
->
setTickmarkInterval
(
2
);
wid
.
push_back
(
myTVPhosLevel
);
ypos
+=
lineHeight
+
VGAP
;
}
...
...
@@ -232,11 +232,11 @@ void StellaSettingsDialog::saveConfig()
instance
().
settings
().
setValue
(
"tv.phosphor"
,
myTVPhosLevel
->
getValue
()
>
0
?
"always"
:
"byrom"
);
// TV phosphor blend
instance
().
settings
().
setValue
(
"tv.phosblend"
,
instance
().
settings
().
setValue
(
"tv.phosblend"
,
levelToValue
(
myTVPhosLevel
->
getValue
()));
// TV scanline intensity and interpolation
instance
().
settings
().
setValue
(
"tv.scanlines"
,
instance
().
settings
().
setValue
(
"tv.scanlines"
,
levelToValue
(
myTVScanIntense
->
getValue
()));
// Controller properties
...
...
@@ -300,6 +300,16 @@ void StellaSettingsDialog::handleCommand(CommandSender* sender, int cmd,
handleTVModeChange
();
break
;
case
kScanlinesChanged
:
if
(
myTVScanIntense
->
getValue
()
==
0
)
myTVScanIntense
->
setValueLabel
(
"off"
);
break
;
case
kPhosphorChanged
:
if
(
myTVPhosLevel
->
getValue
()
==
0
)
myTVPhosLevel
->
setValueLabel
(
"off"
);
break
;
default:
Dialog
::
handleCommand
(
sender
,
cmd
,
data
,
0
);
break
;
...
...
@@ -405,7 +415,7 @@ int StellaSettingsDialog::levelToValue(int level)
{
const
int
NUM_LEVELS
=
11
;
uInt8
values
[
NUM_LEVELS
]
=
{
0
,
5
,
11
,
18
,
26
,
35
,
45
,
56
,
68
,
81
,
95
};
return
values
[
std
::
min
(
level
,
NUM_LEVELS
-
1
)];
}
...
...
src/gui/StellaSettingsDialog.hxx
View file @
e2f5be47
...
...
@@ -63,7 +63,7 @@ class StellaSettingsDialog : public Dialog
StaticTextWidget
*
myTVScanlines
;
SliderWidget
*
myTVScanIntense
;
// TV phosphor effect
// TV phosphor effect
SliderWidget
*
myTVPhosLevel
;
// Controller properties
...
...
@@ -77,7 +77,9 @@ class StellaSettingsDialog : public Dialog
StaticTextWidget
*
myRightPortDetected
;
enum
{
kTVModeChanged
=
'
SStv
'
,
kTVModeChanged
=
'
SStv
'
,
kScanlinesChanged
=
'
SSsc
'
,
kPhosphorChanged
=
'
SSph
'
};
// Game properties for currently loaded ROM
...
...
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