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
fuse-libretro
Commits
23f7db52
Unverified
Commit
23f7db52
authored
Oct 16, 2021
by
Libretro-Admin
Committed by
GitHub
Oct 16, 2021
Browse files
Merge pull request #120 from salvacam/size_border
option size border
parents
4f6a1560
d322c8af
Pipeline
#74714
failed with stages
in 22 minutes and 42 seconds
Changes
1
Pipelines
75
Hide whitespace changes
Inline
Side-by-side
src/libretro.c
View file @
23f7db52
...
...
@@ -85,7 +85,7 @@ static retro_input_poll_t input_poll_cb;
static
uint16_t
image_buffer_2
[
MAX_WIDTH
*
MAX_HEIGHT
];
static
unsigned
first_pixel
;
static
unsigned
soft_width
,
soft_height
;
static
int
hid
e_border
;
static
int
siz
e_border
;
static
int
keyb_transparent
;
static
const
machine_t
*
machine
;
static
double
frame_time
;
...
...
@@ -268,7 +268,7 @@ keysyms_map_t keysyms_map[] = {
static
const
struct
retro_variable
core_vars
[]
=
{
{
"fuse_machine"
,
"Model (needs content load); Spectrum 48K|Spectrum 48K (NTSC)|Spectrum 128K|Spectrum +2|Spectrum +2A|Spectrum +3|Spectrum +3e|Spectrum SE|Timex TC2048|Timex TC2068|Timex TS2068|Spectrum 16K|Pentagon 128K|Pentagon 512K|Pentagon 1024|Scorpion 256K"
},
{
"fuse_
hid
e_border"
,
"
Hid
e Video Border;
disabled|enabled
"
},
{
"fuse_
siz
e_border"
,
"
Siz
e Video Border;
full|medium|small|minimum|none
"
},
{
"fuse_auto_load"
,
"Tape Auto Load; enabled|disabled"
},
{
"fuse_fast_load"
,
"Tape Fast Load; enabled|disabled"
},
{
"fuse_load_sound"
,
"Tape Load Sound; enabled|disabled"
},
...
...
@@ -333,10 +333,25 @@ int update_variables(int force)
hard_width
=
width
;
hard_height
=
height
;
hid
e_border
=
coreopt
(
env_cb
,
core_vars
,
"fuse_
hid
e_border"
,
NULL
);
hid
e_border
+=
hid
e_border
<
0
;
siz
e_border
=
coreopt
(
env_cb
,
core_vars
,
"fuse_
siz
e_border"
,
NULL
);
siz
e_border
+=
siz
e_border
<
0
;
if
(
hide_border
)
if
(
size_border
==
1
)
{
soft_width
=
machine
->
is_timex
?
576
:
288
;
soft_height
=
machine
->
is_timex
?
432
:
216
;
}
else
if
(
size_border
==
2
)
{
soft_width
=
machine
->
is_timex
?
544
:
272
;
soft_height
=
machine
->
is_timex
?
408
:
204
;
}
else
if
(
size_border
==
3
)
{
soft_width
=
machine
->
is_timex
?
528
:
264
;
soft_height
=
machine
->
is_timex
?
396
:
198
;
}
else
if
(
size_border
==
4
)
{
soft_width
=
machine
->
is_timex
?
512
:
256
;
soft_height
=
machine
->
is_timex
?
384
:
192
;
...
...
@@ -354,14 +369,29 @@ int update_variables(int force)
else
{
// When reloading content, this is already done as part of the machine change
int
option
=
coreopt
(
env_cb
,
core_vars
,
"fuse_
hid
e_border"
,
NULL
);
int
option
=
coreopt
(
env_cb
,
core_vars
,
"fuse_
siz
e_border"
,
NULL
);
option
+=
option
<
0
;
if
(
option
!=
hid
e_border
||
force
)
if
(
option
!=
siz
e_border
||
force
)
{
hid
e_border
=
option
;
siz
e_border
=
option
;
if
(
hide_border
)
if
(
size_border
==
1
)
{
soft_width
=
machine
->
is_timex
?
576
:
288
;
soft_height
=
machine
->
is_timex
?
432
:
216
;
}
else
if
(
size_border
==
2
)
{
soft_width
=
machine
->
is_timex
?
544
:
272
;
soft_height
=
machine
->
is_timex
?
408
:
204
;
}
else
if
(
size_border
==
3
)
{
soft_width
=
machine
->
is_timex
?
528
:
264
;
soft_height
=
machine
->
is_timex
?
396
:
198
;
}
else
if
(
size_border
==
4
)
{
soft_width
=
machine
->
is_timex
?
512
:
256
;
soft_height
=
machine
->
is_timex
?
384
:
192
;
...
...
@@ -985,7 +1015,7 @@ void retro_run(void)
struct
retro_game_geometry
geometry
;
// Here we use the "soft" resolution that is changed according to the
// fuse_
hid
e_border variable
// fuse_
siz
e_border variable
geometry
.
base_width
=
soft_width
;
geometry
.
base_height
=
soft_height
;
...
...
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