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
12098369
Commit
12098369
authored
Feb 05, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow resizing of testsprite
parent
8209e2a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
testsprite.c
test/testsprite.c
+4
-1
No files found.
test/testsprite.c
View file @
12098369
...
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
...
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
}
}
numsprites
=
NUM_SPRITES
;
numsprites
=
NUM_SPRITES
;
videoflags
=
SDL_SWSURFACE
|
SDL_ANYFORMAT
;
videoflags
=
SDL_SWSURFACE
|
SDL_ANYFORMAT
|
SDL_RESIZABLE
;
width
=
640
;
width
=
640
;
height
=
480
;
height
=
480
;
video_bpp
=
8
;
video_bpp
=
8
;
...
@@ -297,6 +297,9 @@ main(int argc, char *argv[])
...
@@ -297,6 +297,9 @@ main(int argc, char *argv[])
++
frames
;
++
frames
;
while
(
SDL_PollEvent
(
&
event
))
{
while
(
SDL_PollEvent
(
&
event
))
{
switch
(
event
.
type
)
{
switch
(
event
.
type
)
{
case
SDL_VIDEORESIZE
:
screen
=
SDL_SetVideoMode
(
event
.
resize
.
w
,
event
.
resize
.
h
,
video_bpp
,
videoflags
);
break
;
case
SDL_MOUSEBUTTONDOWN
:
case
SDL_MOUSEBUTTONDOWN
:
SDL_WarpMouse
(
screen
->
w
/
2
,
screen
->
h
/
2
);
SDL_WarpMouse
(
screen
->
w
/
2
,
screen
->
h
/
2
);
break
;
break
;
...
...
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