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
7d245d05
Commit
7d245d05
authored
Aug 22, 2010
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed spurious carriage returns
parent
d980c084
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1095 additions
and
1095 deletions
+1095
-1095
SDL_stdinc.h
include/SDL_stdinc.h
+801
-801
SDL_syshaptic.c
src/haptic/nds/SDL_syshaptic.c
+41
-41
SDL_sysjoystick.c
src/joystick/nds/SDL_sysjoystick.c
+23
-23
SDL_win32video.c
src/video/win32/SDL_win32video.c
+230
-230
No files found.
include/SDL_stdinc.h
View file @
7d245d05
This diff is collapsed.
Click to expand it.
src/haptic/nds/SDL_syshaptic.c
View file @
7d245d05
...
...
@@ -43,35 +43,35 @@ typedef struct
}
NDS_HapticData
;
v
oid
NDS_EZF_OpenNorWrite
()
void
NDS_EZF_OpenNorWrite
()
{
G
BA_BUS
[
0x0FF0000
]
=
0xD200
;
G
BA_BUS
[
0x0000000
]
=
0x1500
;
G
BA_BUS
[
0x0010000
]
=
0xD200
;
G
BA_BUS
[
0x0020000
]
=
0x1500
;
G
BA_BUS
[
0x0E20000
]
=
0x1500
;
G
BA_BUS
[
0x0FE0000
]
=
0x1500
;
}
void
NDS_EZF_CloseNorWrite
()
GBA_BUS
[
0x0FF0000
]
=
0xD200
;
GBA_BUS
[
0x0000000
]
=
0x1500
;
GBA_BUS
[
0x0010000
]
=
0xD200
;
GBA_BUS
[
0x0020000
]
=
0x1500
;
GBA_BUS
[
0x0E20000
]
=
0x1500
;
GBA_BUS
[
0x0FE0000
]
=
0x1500
;
}
void
NDS_EZF_CloseNorWrite
()
{
G
BA_BUS
[
0x0FF0000
]
=
0xD200
;
G
BA_BUS
[
0x0000000
]
=
0x1500
;
G
BA_BUS
[
0x0010000
]
=
0xD200
;
G
BA_BUS
[
0x0020000
]
=
0x1500
;
G
BA_BUS
[
0x0E20000
]
=
0xD200
;
G
BA_BUS
[
0x0FE0000
]
=
0x1500
;
}
GBA_BUS
[
0x0FF0000
]
=
0xD200
;
GBA_BUS
[
0x0000000
]
=
0x1500
;
GBA_BUS
[
0x0010000
]
=
0xD200
;
GBA_BUS
[
0x0020000
]
=
0x1500
;
GBA_BUS
[
0x0E20000
]
=
0xD200
;
GBA_BUS
[
0x0FE0000
]
=
0x1500
;
}
void
NDS_EZF_ChipReset
()
{
G
BA_BUS
[
0x0000
]
=
0x00F0
;
G
BA_BUS
[
0x1000
]
=
0x00F0
;
}
uint32
NDS_EZF_IsPresent
()
GBA_BUS
[
0x0000
]
=
0x00F0
;
GBA_BUS
[
0x1000
]
=
0x00F0
;
}
uint32
NDS_EZF_IsPresent
()
{
v
uint16
id1
,
id2
;
vuint16
id1
,
id2
;
NDS_EZF_OpenNorWrite
();
...
...
@@ -81,35 +81,35 @@ NDS_EZF_ChipReset()
GBA_BUS
[
0x1555
]
=
0x00AA
;
GBA_BUS
[
0x12AA
]
=
0x0055
;
GBA_BUS
[
0x1555
]
=
0x0090
;
i
d1
=
GBA_BUS
[
0x0001
];
i
d2
=
GBA_BUS
[
0x1001
];
i
f
((
id1
!=
0x227E
)
||
(
id2
!=
0x227E
))
{
id1
=
GBA_BUS
[
0x0001
];
id2
=
GBA_BUS
[
0x1001
];
if
((
id1
!=
0x227E
)
||
(
id2
!=
0x227E
))
{
NDS_EZF_CloseNorWrite
();
r
eturn
0
;
return
0
;
}
i
d1
=
GBA_BUS
[
0x000E
];
i
d2
=
GBA_BUS
[
0x100E
];
id1
=
GBA_BUS
[
0x000E
];
id2
=
GBA_BUS
[
0x100E
];
NDS_EZF_CloseNorWrite
();
i
f
(
id1
==
0x2218
&&
id2
==
0x2218
)
{
r
eturn
1
;
if
(
id1
==
0x2218
&&
id2
==
0x2218
)
{
return
1
;
}
r
eturn
0
;
}
v
oid
NDS_EZF_SetShake
(
u8
pos
)
return
0
;
}
void
NDS_EZF_SetShake
(
u8
pos
)
{
u16
data
=
((
pos
%
3
)
|
0x00F0
);
G
BA_BUS
[
0x0FF0000
]
=
0xD200
;
G
BA_BUS
[
0x0000000
]
=
0x1500
;
G
BA_BUS
[
0x0010000
]
=
0xD200
;
G
BA_BUS
[
0x0020000
]
=
0x1500
;
G
BA_BUS
[
0x0F10000
]
=
data
;
G
BA_BUS
[
0x0FE0000
]
=
0x1500
;
GBA_BUS
[
0x0FF0000
]
=
0xD200
;
GBA_BUS
[
0x0000000
]
=
0x1500
;
GBA_BUS
[
0x0010000
]
=
0xD200
;
GBA_BUS
[
0x0020000
]
=
0x1500
;
GBA_BUS
[
0x0F10000
]
=
data
;
GBA_BUS
[
0x0FE0000
]
=
0x1500
;
GBA_BUS
[
0
]
=
0x0000
;
/* write any value for vibration. */
GBA_BUS
[
0
]
=
0x0002
;
}
}
static
int
SDL_SYS_LogicError
(
void
)
...
...
src/joystick/nds/SDL_sysjoystick.c
View file @
7d245d05
...
...
@@ -45,7 +45,7 @@ int
SDL_SYS_JoystickInit
(
void
)
{
SDL_numjoysticks
=
1
;
r
eturn
(
1
);
return
(
1
);
}
/* Function to get the device-dependent name of a joystick */
...
...
@@ -73,7 +73,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joystick)
return
0
;
}
/* Function to update the state of a joystick - called as a device poll.
* This function shouldn't update the joystick structure directly,
* but instead should call SDL_PrivateJoystick*() to deliver events
...
...
@@ -84,8 +84,8 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
{
u32
keysd
,
keysu
;
int
magnitude
=
16384
;
/*scanKeys(); - this is done in PumpEvents, because touch uses it too */
/*scanKeys(); - this is done in PumpEvents, because touch uses it too */
keysd
=
keysDown
();
keysu
=
keysUp
();
...
...
@@ -101,61 +101,61 @@ SDL_SYS_JoystickUpdate(SDL_Joystick * joystick)
if
((
keysd
&
KEY_RIGHT
))
{
SDL_PrivateJoystickAxis
(
joystick
,
0
,
magnitude
);
}
i
f
((
keysu
&
(
KEY_UP
|
KEY_DOWN
)))
{
if
((
keysu
&
(
KEY_UP
|
KEY_DOWN
)))
{
SDL_PrivateJoystickAxis
(
joystick
,
1
,
0
);
}
i
f
((
keysu
&
(
KEY_LEFT
|
KEY_RIGHT
)))
{
if
((
keysu
&
(
KEY_LEFT
|
KEY_RIGHT
)))
{
SDL_PrivateJoystickAxis
(
joystick
,
0
,
0
);
}
i
f
((
keysd
&
KEY_A
))
{
if
((
keysd
&
KEY_A
))
{
SDL_PrivateJoystickButton
(
joystick
,
0
,
SDL_PRESSED
);
}
i
f
((
keysd
&
KEY_B
))
{
if
((
keysd
&
KEY_B
))
{
SDL_PrivateJoystickButton
(
joystick
,
1
,
SDL_PRESSED
);
}
i
f
((
keysd
&
KEY_X
))
{
if
((
keysd
&
KEY_X
))
{
SDL_PrivateJoystickButton
(
joystick
,
2
,
SDL_PRESSED
);
}
i
f
((
keysd
&
KEY_Y
))
{
if
((
keysd
&
KEY_Y
))
{
SDL_PrivateJoystickButton
(
joystick
,
3
,
SDL_PRESSED
);
}
i
f
((
keysd
&
KEY_L
))
{
if
((
keysd
&
KEY_L
))
{
SDL_PrivateJoystickButton
(
joystick
,
4
,
SDL_PRESSED
);
}
i
f
((
keysd
&
KEY_R
))
{
if
((
keysd
&
KEY_R
))
{
SDL_PrivateJoystickButton
(
joystick
,
5
,
SDL_PRESSED
);
}
i
f
((
keysd
&
KEY_SELECT
))
{
if
((
keysd
&
KEY_SELECT
))
{
SDL_PrivateJoystickButton
(
joystick
,
6
,
SDL_PRESSED
);
}
i
f
((
keysd
&
KEY_START
))
{
if
((
keysd
&
KEY_START
))
{
SDL_PrivateJoystickButton
(
joystick
,
7
,
SDL_PRESSED
);
}
i
f
((
keysu
&
KEY_A
))
{
if
((
keysu
&
KEY_A
))
{
SDL_PrivateJoystickButton
(
joystick
,
0
,
SDL_RELEASED
);
}
i
f
((
keysu
&
KEY_B
))
{
if
((
keysu
&
KEY_B
))
{
SDL_PrivateJoystickButton
(
joystick
,
1
,
SDL_RELEASED
);
}
i
f
((
keysu
&
KEY_X
))
{
if
((
keysu
&
KEY_X
))
{
SDL_PrivateJoystickButton
(
joystick
,
2
,
SDL_RELEASED
);
}
i
f
((
keysu
&
KEY_Y
))
{
if
((
keysu
&
KEY_Y
))
{
SDL_PrivateJoystickButton
(
joystick
,
3
,
SDL_RELEASED
);
}
i
f
((
keysu
&
KEY_L
))
{
if
((
keysu
&
KEY_L
))
{
SDL_PrivateJoystickButton
(
joystick
,
4
,
SDL_RELEASED
);
}
i
f
((
keysu
&
KEY_R
))
{
if
((
keysu
&
KEY_R
))
{
SDL_PrivateJoystickButton
(
joystick
,
5
,
SDL_RELEASED
);
}
i
f
((
keysu
&
KEY_SELECT
))
{
if
((
keysu
&
KEY_SELECT
))
{
SDL_PrivateJoystickButton
(
joystick
,
6
,
SDL_RELEASED
);
}
i
f
((
keysu
&
KEY_START
))
{
if
((
keysu
&
KEY_START
))
{
SDL_PrivateJoystickButton
(
joystick
,
7
,
SDL_RELEASED
);
}
}
}
/* Function to close a joystick after use */
void
...
...
src/video/win32/SDL_win32video.c
View file @
7d245d05
This diff is collapsed.
Click to expand it.
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