Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
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
libSDL
Commits
1fc724be
Commit
1fc724be
authored
Jul 06, 2011
by
Ryan C. Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly set up default resolutions.
Fixes Bugzilla #1191. Thanks to Jeremy Jurksztowicz for the fix!
parent
dfe63993
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
SDL_uikitvideo.m
src/video/uikit/SDL_uikitvideo.m
+8
-3
No files found.
src/video/uikit/SDL_uikitvideo.m
View file @
1fc724be
...
...
@@ -202,7 +202,7 @@ UIKit_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
static
void
UIKit_AddDisplay
(
UIScreen
*
uiscreen
,
int
w
,
int
h
)
UIKit_AddDisplay
(
UIScreen
*
uiscreen
,
UIScreenMode
*
uimode
,
int
w
,
int
h
)
{
SDL_VideoDisplay
display
;
SDL_DisplayMode
mode
;
...
...
@@ -212,6 +212,9 @@ UIKit_AddDisplay(UIScreen *uiscreen, int w, int h)
mode
.
h
=
h
;
mode
.
refresh_rate
=
0
;
[
uimode
retain
];
mode
.
driverdata
=
uimode
;
SDL_zero
(
display
);
display
.
desktop_mode
=
mode
;
display
.
current_mode
=
mode
;
...
...
@@ -238,8 +241,9 @@ UIKit_VideoInit(_THIS)
if
(
!
SDL_UIKit_supports_multiple_displays
)
{
// Just give 'em the whole main screen.
UIScreen
*
uiscreen
=
[
UIScreen
mainScreen
];
UIScreenMode
*
uiscreenmode
=
[
uiscreen
currentMode
];
const
CGRect
rect
=
[
uiscreen
bounds
];
UIKit_AddDisplay
(
uiscreen
,
(
int
)
rect
.
size
.
width
,
(
int
)
rect
.
size
.
height
);
UIKit_AddDisplay
(
uiscreen
,
uiscreenmode
,
(
int
)
rect
.
size
.
width
,
(
int
)
rect
.
size
.
height
);
}
else
{
const
NSArray
*
screens
=
[
UIScreen
screens
];
const
NSUInteger
screen_count
=
[
screens
count
];
...
...
@@ -247,8 +251,9 @@ UIKit_VideoInit(_THIS)
for
(
i
=
0
;
i
<
screen_count
;
i
++
)
{
// the main screen is the first element in the array.
UIScreen
*
uiscreen
=
(
UIScreen
*
)
[
screens
objectAtIndex
:
i
];
UIScreenMode
*
uiscreenmode
=
[
uiscreen
currentMode
];
const
CGSize
size
=
[[
uiscreen
currentMode
]
size
];
UIKit_AddDisplay
(
uiscreen
,
(
int
)
size
.
width
,
(
int
)
size
.
height
);
UIKit_AddDisplay
(
uiscreen
,
uiscreenmode
,
(
int
)
size
.
width
,
(
int
)
size
.
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