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
fdf2d42e
Commit
fdf2d42e
authored
Jan 12, 2012
by
CeRiAl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quick 1.2.10 "fixes" (surely broken for now)
parent
9582f364
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
55 deletions
+50
-55
Makefile
build-mingw32ce/Makefile
+4
-4
SDL_syscdrom.c
src/cdrom/win32/SDL_syscdrom.c
+2
-4
SDL_win32_main.c
src/main/win32/SDL_win32_main.c
+1
-0
SDL_sysevents.c
src/video/wincommon/SDL_sysevents.c
+15
-9
SDL_dibevents.c
src/video/windib/SDL_dibevents.c
+17
-28
SDL_dibvideo.c
src/video/windib/SDL_dibvideo.c
+7
-6
SDL_dibvideo.h
src/video/windib/SDL_dibvideo.h
+0
-1
SDL_gapivideo.h
src/video/wingapi/SDL_gapivideo.h
+4
-3
No files found.
build-mingw32ce/Makefile
View file @
fdf2d42e
...
...
@@ -12,17 +12,17 @@ CFLAGS += -DWINCE_EXTRADEBUG
#CFLAGS += -DDEBUG -g
CFLAGS
+=
-O3
-march
=
armv4
-mtune
=
xscale
OBJS
=
src/audio/SDL_audio.o src/audio/SDL_audiocvt.o src/audio/SDL_audiodev.o src/audio/
SDL_audiomem
.o src/audio/SDL_mixer.o src/audio/SDL_wave.o
OBJS
=
src/audio/SDL_audio.o src/audio/SDL_audiocvt.o src/audio/SDL_audiodev.o src/audio/
windib/SDL_dibaudio
.o src/audio/SDL_mixer.o src/audio/SDL_wave.o
OBJS
+=
src/audio/windib/SDL_dibaudio.o
OBJS
+=
src/cdrom/SDL_cdrom.o src/cdrom/win32/SDL_syscdrom.o src/e
ndian/SDL_endian.o src/e
vents/SDL_active.o src/events/SDL_events.o src/events/SDL_expose.o
OBJS
+=
src/cdrom/SDL_cdrom.o src/cdrom/win32/SDL_syscdrom.o src/events/SDL_active.o src/events/SDL_events.o src/events/SDL_expose.o
OBJS
+=
src/events/SDL_keyboard.o src/events/SDL_mouse.o src/events/SDL_quit.o src/events/SDL_resize.o src/file/SDL_rwops.o src/joystick/SDL_joystick.o
OBJS
+=
src/joystick/win32/SDL_mmjoystick.o src/thread/win32/SDL_sysmutex.o src/thread/win32/SDL_syssem.o src/thread/win32/SDL_systhread.o
OBJS
+=
src/thread/SDL_thread.o src/thread/win32/win_ce_semaphore.o src/timer/win32/SDL_systimer.o src/timer/SDL_timer.o src/video/windib/SDL_dibevents.o
OBJS
+=
src/video/win
dib/SDL_dibvideo.o src/video/wincommon/SDL_sysevents.o src/video/wincommon/SDL_sysmouse.o src/video/wincommon/SDL_syswm
.o
OBJS
+=
src/video/win
common/SDL_sysmouse.o src/video/wincommon/SDL_syswm.o src/video/windib/SDL_dibvideo.o src/video/wincommon/SDL_sysevents
.o
OBJS
+=
src/video/wingapi/SDL_gapivideo.o src/video/wingapi/ARM_rot.o src/video/SDL_blit.o src/video/SDL_blit_0.o src/video/SDL_blit_1.o src/video/SDL_blit_A.o
OBJS
+=
src/video/ARM_blit1to2.o src/video/SDL_blit_N.o src/video/SDL_bmp.o src/video/SDL_cursor.o src/video/SDL_gamma.o src/video/SDL_pixels.o src/video/SDL_RLEaccel.o
OBJS
+=
src/video/SDL_stretch.o src/video/SDL_surface.o src/video/SDL_video.o src/video/SDL_yuv.o src/video/SDL_yuv_mmx.o src/video/SDL_yuv_sw.o
OBJS
+=
src/main/win32/SDL_win32_main.o src/SDL.o src/SDL_error.o src/SDL_fatal.o src/
SDL_getenv.o src/SDL_
loadso.o
OBJS
+=
src/main/win32/SDL_win32_main.o src/SDL.o src/SDL_error.o src/SDL_fatal.o src/
stdlib/SDL_getenv.o src/loadso/win32/SDL_sys
loadso.o
create-output-directories
:=
\
$(
shell
for
f
in
$(OBJS)
;
\
...
...
src/cdrom/win32/SDL_syscdrom.c
View file @
fdf2d42e
...
...
@@ -400,8 +400,6 @@ void SDL_SYS_CDQuit(void)
}
}
<<<<<<<
HEAD
#endif
/* SDL_CDROM_WIN32 */
=======
#endif
>>>>>>>
b84a788
...
Applied
patch
libsdl_20090809_diff
from
http
:
//users.uoa.gr/~knakos/scummvm/libraries/
#endif
/* SDL_CDROM_WIN32 */
src/main/win32/SDL_win32_main.c
View file @
fdf2d42e
...
...
@@ -253,6 +253,7 @@ int console_main(int argc, char *argv[])
is called later in the video initialization.
*/
SDL_SetModuleHandle
(
GetModuleHandle
(
NULL
));
#endif
/* Run the application main() code */
status
=
SDL_main
(
argc
,
argv
);
...
...
src/video/wincommon/SDL_sysevents.c
View file @
fdf2d42e
...
...
@@ -54,7 +54,6 @@
#define NO_CHANGEDISPLAYSETTINGS
#undef WM_MOUSELEAVE
#define DM_DISPLAYORIENTATION 0x00800000L
typedef
struct
_devicemode
{
WCHAR
dmDeviceName
[
CCHDEVICENAME
];
WORD
dmSpecVersion
;
...
...
@@ -166,7 +165,8 @@ static void LoadAygshell(void)
}
/* for gapi landscape mode */
static
void
GapiTransform
(
SDL_ScreenOrientation
rotate
,
char
hires
,
Sint16
*
x
,
Sint16
*
y
)
{
//static void GapiTransform(SDL_ScreenOrientation rotate, char hires, Sint16 *x, Sint16 *y) {
static
void
GapiTransform
(
SDL_RotateAttr
rotate
,
char
hires
,
Sint16
*
x
,
Sint16
*
y
)
{
Sint16
rotatedX
;
Sint16
rotatedY
;
...
...
@@ -239,7 +239,7 @@ void WIN_FlushMessageQueue()
static
void
SDL_RestoreGameMode
(
void
)
{
#ifdef _WIN32_WCE
#ifdef _WIN32_WCE
_NEWGAPI
SDL_VideoDevice
*
this
=
current_video
;
if
(
SDL_strcmp
(
this
->
name
,
"gapi"
)
==
0
)
{
...
...
@@ -261,7 +261,7 @@ static void SDL_RestoreGameMode(void)
static
void
SDL_RestoreDesktopMode
(
void
)
{
#ifdef _WIN32_WCE
#ifdef _WIN32_WCE
_NEWGAPI
SDL_VideoDevice
*
this
=
current_video
;
if
(
SDL_strcmp
(
this
->
name
,
"gapi"
)
==
0
)
{
...
...
@@ -494,11 +494,15 @@ void transform(SDL_RotateAttr rotate, char ozone, Sint16 *x, Sint16 *y) {
/* then, rotate sccording to surface */
switch
(
rotate
)
{
case
SDL_
ROTATE_NONE
:
case
SDL_
ORIENTATION_UP
:
*
x
-=
padWidth
;
*
y
-=
padHeight
;
break
;
case
SDL_ROTATE_LEFT
:
case
SDL_ORIENTATION_DOWN
:
*
x
=
padWidth
;
*
y
=
padHeight
;
break
;
case
SDL_ORIENTATION_LEFT
:
if
(
!
SDL_VideoSurface
)
break
;
*
x
-=
padHeight
;
...
...
@@ -508,7 +512,7 @@ void transform(SDL_RotateAttr rotate, char ozone, Sint16 *x, Sint16 *y) {
*
x
=
rotatedX
;
*
y
=
rotatedY
;
break
;
case
SDL_
ROTATE
_RIGHT
:
case
SDL_
ORIENTATION
_RIGHT
:
if
(
!
SDL_VideoSurface
)
break
;
*
x
-=
padHeight
;
...
...
@@ -646,7 +650,8 @@ LRESULT CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
else
{
#ifdef _WIN32_WCE
if
(
SDL_VideoSurface
)
GapiTransform
(
this
->
hidden
->
userOrientation
,
this
->
hidden
->
hiresFix
,
&
x
,
&
y
);
// GapiTransform(this->hidden->userOrientation, this->hidden->hiresFix, &x, &y);
GapiTransform
(
rotation
,
ozoneHack
,
&
x
,
&
y
);
#endif
posted
=
SDL_PrivateMouseMotion
(
0
,
0
,
x
,
y
);
}
...
...
@@ -738,7 +743,8 @@ LRESULT CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
y
=
(
Sint16
)
HIWORD
(
lParam
);
#ifdef _WIN32_WCE
if
(
SDL_VideoSurface
)
GapiTransform
(
this
->
hidden
->
userOrientation
,
this
->
hidden
->
hiresFix
,
&
x
,
&
y
);
// GapiTransform(this->hidden->userOrientation, this->hidden->hiresFix, &x, &y);
GapiTransform
(
rotation
,
ozoneHack
,
&
x
,
&
y
);
#endif
}
#ifdef _WIN32_WCE
...
...
src/video/windib/SDL_dibevents.c
View file @
fdf2d42e
...
...
@@ -44,6 +44,7 @@
/* The translation table from a Microsoft VK keysym to a SDL keysym */
static
SDLKey
VK_keymap
[
SDLK_LAST
];
static
SDL_keysym
*
TranslateKey
(
WPARAM
vkey
,
UINT
scancode
,
SDL_keysym
*
keysym
,
int
pressed
);
static
BOOL
prev_shiftstates
[
2
];
/* Masks for processing the windows KEYDOWN and KEYUP messages */
#define REPEATED_KEYMASK (1<<30)
...
...
@@ -61,36 +62,24 @@ static WNDPROCTYPE userWindowProc = NULL;
#ifdef _WIN32_WCE
WPARAM
rotateKey
(
WPARAM
key
,
SDL_ScreenOrientation
direction
)
{
if
(
direction
!=
SDL_ORIENTATION_LEFT
)
return
key
;
switch
(
key
)
{
case
0x26
:
/* up */
return
0x27
;
case
0x27
:
/* right */
return
0x28
;
case
0x28
:
/* down */
return
0x25
;
case
0x25
:
/* left */
return
0x26
;
}
return
key
;
}
#endif
#ifdef _WIN32_WCE
WPARAM
rotateKey
(
WPARAM
key
,
SDL_RotateAttr
direction
)
{
WPARAM
rotateKey
(
WPARAM
key
,
SDL_ScreenOrientation
direction
)
{
switch
(
direction
)
{
case
SDL_
ROTATE_NONE
:
case
SDL_
ORIENTATION_UP
:
return
key
;
case
SDL_ROTATE_LEFT
:
case
SDL_ORIENTATION_DOWN
:
switch
(
key
)
{
case
VK_UP
:
return
VK_DOWN
;
case
VK_RIGHT
:
return
VK_LEFT
;
case
VK_DOWN
:
return
VK_UP
;
case
VK_LEFT
:
return
VK_RIGHT
;
}
case
SDL_ORIENTATION_LEFT
:
switch
(
key
)
{
case
VK_UP
:
return
VK_RIGHT
;
...
...
@@ -102,7 +91,7 @@ WPARAM rotateKey(WPARAM key, SDL_RotateAttr direction) {
return
VK_UP
;
}
case
SDL_
ROTATE
_RIGHT
:
case
SDL_
ORIENTATION
_RIGHT
:
switch
(
key
)
{
case
VK_UP
:
return
VK_LEFT
;
...
...
src/video/windib/SDL_dibvideo.c
View file @
fdf2d42e
...
...
@@ -832,7 +832,7 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
/* See if we need to rotate the buffer (WinCE specific) */
screenWidth
=
GetDeviceCaps
(
hdc
,
HORZRES
);
screenHeight
=
GetDeviceCaps
(
hdc
,
VERTRES
);
rotation
=
SDL_ROTATE_NONE
;
this
->
hidden
->
orientation
=
SDL_ORIENTATION_UP
;
work_pixels
=
NULL
;
if
(
rotation_pixels
)
{
free
(
rotation_pixels
);
...
...
@@ -844,16 +844,16 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
video
->
pixels
=
malloc
(
video
->
h
*
video
->
pitch
);
rotation_pixels
=
video
->
pixels
;
if
(
video
->
pixels
)
rotation
=
SDL_ROTATE
_LEFT
;
this
->
hidden
->
orientation
=
SDL_ORIENTATION
_LEFT
;
OutputDebugString
(
TEXT
(
"will rotate
\r\n
"
));
}
screen_bmp
=
CreateDIBSection
(
hdc
,
binfo
,
DIB_RGB_COLORS
,
(
rotation
==
SDL_ROTATE_NONE
?
(
void
**
)(
&
video
->
pixels
)
:
(
void
**
)
&
work_pixels
),
NULL
,
0
);
(
this
->
hidden
->
orientation
==
SDL_ORIENTATION_UP
?
(
void
**
)(
&
video
->
pixels
)
:
(
void
**
)
&
work_pixels
),
NULL
,
0
);
ReleaseDC
(
SDL_Window
,
hdc
);
#if defined(UNDER_CE)
/* keep bitmapinfo for palette in 8-bit modes for devices that don't have SetDIBColorTable */
last_bits
=
(
rotation
==
SDL_ROTATE_NONE
?
(
void
**
)(
&
video
->
pixels
)
:
(
void
**
)
&
work_pixels
);
last_bits
=
(
this
->
hidden
->
orientation
==
SDL_ORIENTATION_UP
?
(
void
**
)(
&
video
->
pixels
)
:
(
void
**
)
&
work_pixels
);
if
(
last_bitmapinfo
)
free
(
last_bitmapinfo
);
if
(
is16bitmode
)
...
...
@@ -911,7 +911,7 @@ SDL_Surface *DIB_SetVideoMode(_THIS, SDL_Surface *current,
bounds
.
right
=
SDL_windowX
+
video
->
w
;
bounds
.
bottom
=
SDL_windowY
+
video
->
h
;
#ifdef UNDER_CE
if
(
rotation
!=
SDL_ROTATE_NONE
)
if
(
this
->
hidden
->
orientation
!=
SDL_ORIENTATION_UP
)
{
int
t
=
bounds
.
right
;
bounds
.
right
=
bounds
.
bottom
;
...
...
@@ -1217,7 +1217,7 @@ int DIB_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors)
#if defined(UNDER_CE)
#if !defined(NO_SETDIBCOLORTABLE)
/* BUG: For some reason SetDIBColorTable is not working when screen is not rotated */
if
(
rotation
==
SDL_
ROTATE_NONE
&&
last_bitmapinfo
)
if
(
rotation
==
SDL_
ORIENTATION_UP
&&
last_bitmapinfo
)
#else
if
(
1
)
#endif
...
...
@@ -1247,6 +1247,7 @@ int DIB_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors)
}
#endif
DeleteDC
(
mdc
);
#endif
ReleaseDC
(
SDL_Window
,
hdc
);
return
(
1
);
}
...
...
src/video/windib/SDL_dibvideo.h
View file @
fdf2d42e
...
...
@@ -42,7 +42,6 @@ struct SDL_PrivateVideoData {
HPALETTE
screen_pal
;
void
*
work_pixels
;
/* if the display needs to be rotated, memory allocated by the API */
void
*
rotation_pixels
;
/* if the display needs to be rotated, memory allocated by the code */
SDL_RotateAttr
rotation
;
char
ozoneHack
;
/* force stylus translation if running without Hi Res flag */
#define NUM_MODELISTS 4
/* 8, 16, 24, and 32 bits-per-pixel */
...
...
src/video/wingapi/SDL_gapivideo.h
View file @
fdf2d42e
...
...
@@ -85,9 +85,10 @@ struct GXKeyList {
/* Rotation direction */
typedef
enum
{
SDL_ROTATE_NONE
,
SDL_ROTATE_LEFT
,
SDL_ROTATE_RIGHT
SDL_ORIENTATION_UP
,
SDL_ORIENTATION_DOWN
,
SDL_ORIENTATION_LEFT
,
SDL_ORIENTATION_RIGHT
}
SDL_RotateAttr
;
/* GAPI video mode */
...
...
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