Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
openjazz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
openjazz
Commits
93c4b9c1
Commit
93c4b9c1
authored
Apr 02, 2010
by
pickle136
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved way to check scale when the resolution changes
parent
8dcf4118
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
video.cpp
src/io/gfx/video.cpp
+12
-5
setupmenu.cpp
src/menu/setupmenu.cpp
+0
-7
No files found.
src/io/gfx/video.cpp
View file @
93c4b9c1
...
@@ -69,14 +69,21 @@ void createScreen () {
...
@@ -69,14 +69,21 @@ void createScreen () {
#if defined(WIZ) || defined(GP2X)
#if defined(WIZ) || defined(GP2X)
screen
=
SDL_SetVideoMode
(
320
,
240
,
8
,
V_FULLSCREEN
);
screen
=
SDL_SetVideoMode
(
320
,
240
,
8
,
V_FULLSCREEN
);
#else
#else
#ifdef FULLSCREEN_ONLY
#ifdef FULLSCREEN_ONLY
screen
=
SDL_SetVideoMode
(
screenW
,
screenH
,
8
,
V_FULLSCREEN
);
screen
=
SDL_SetVideoMode
(
screenW
,
screenH
,
8
,
V_FULLSCREEN
);
#else
#else
screen
=
SDL_SetVideoMode
(
screenW
,
screenH
,
8
,
fullscreen
?
V_FULLSCREEN
:
V_WINDOWED
);
screen
=
SDL_SetVideoMode
(
screenW
,
screenH
,
8
,
fullscreen
?
V_FULLSCREEN
:
V_WINDOWED
);
#endif
#endif
#endif
#endif
#ifdef SCALE
#ifdef SCALE
// Check that the scale will fit in the current resolution
while
(
((
screenW
/
320
<
scaleFactor
)
||
(
screenH
/
200
<
scaleFactor
))
&&
(
scaleFactor
>
1
)
)
{
scaleFactor
--
;
}
if
(
scaleFactor
>
1
)
{
if
(
scaleFactor
>
1
)
{
canvasW
=
screenW
/
scaleFactor
;
canvasW
=
screenW
/
scaleFactor
;
...
@@ -113,7 +120,7 @@ void createScreen () {
...
@@ -113,7 +120,7 @@ void createScreen () {
return
;
return
;
}
}
void
usePalette
(
SDL_Color
*
palette
)
{
void
usePalette
(
SDL_Color
*
palette
)
{
...
...
src/menu/setupmenu.cpp
View file @
93c4b9c1
...
@@ -445,13 +445,6 @@ int Menu::setupScaling () {
...
@@ -445,13 +445,6 @@ int Menu::setupScaling () {
if
((
controls
.
release
(
C_UP
)
||
controls
.
release
(
C_RIGHT
))
&&
(
scaleFactor
<
MAX_SCALE
))
scaleFactor
++
;
if
((
controls
.
release
(
C_UP
)
||
controls
.
release
(
C_RIGHT
))
&&
(
scaleFactor
<
MAX_SCALE
))
scaleFactor
++
;
// Check that the scale will fit in the current resolution
if
(
screenW
/
320
<
scaleFactor
||
screenH
/
200
<
scaleFactor
)
{
scaleFactor
=
oldScaleFactor
;
}
// Check for a scaling change
// Check for a scaling change
if
(
scaleFactor
!=
oldScaleFactor
)
{
if
(
scaleFactor
!=
oldScaleFactor
)
{
...
...
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