Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PUAE
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
PUAE
Commits
d57e527f
Commit
d57e527f
authored
May 20, 2010
by
Mustafa 'GnoStiC' TUFAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.2.0 beta2
parent
94d9cd84
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2205 additions
and
2179 deletions
+2205
-2179
cfgfile.c
src/cfgfile.c
+0
-2
inputdevice.h
src/include/inputdevice.h
+1
-1
options.h
src/include/options.h
+4
-2
inputdevice.c
src/inputdevice.c
+2197
-2171
config.log
src/tools/config.log
+3
-3
No files found.
src/cfgfile.c
View file @
d57e527f
...
@@ -2684,7 +2684,6 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
...
@@ -2684,7 +2684,6 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
case
'W'
:
parse_hardfile_spec
(
arg
);
break
;
case
'W'
:
parse_hardfile_spec
(
arg
);
break
;
case
'S'
:
parse_sound_spec
(
p
,
arg
);
break
;
case
'S'
:
parse_sound_spec
(
p
,
arg
);
break
;
case
'R'
:
p
->
gfx_framerate
=
atoi
(
arg
);
break
;
case
'R'
:
p
->
gfx_framerate
=
atoi
(
arg
);
break
;
case
'x'
:
p
->
no_xhair
=
1
;
break
;
case
'i'
:
p
->
illegal_mem
=
1
;
break
;
case
'i'
:
p
->
illegal_mem
=
1
;
break
;
case
'J'
:
parse_joy_spec
(
p
,
arg
);
break
;
case
'J'
:
parse_joy_spec
(
p
,
arg
);
break
;
...
@@ -3182,7 +3181,6 @@ void default_prefs (struct uae_prefs *p, int type)
...
@@ -3182,7 +3181,6 @@ void default_prefs (struct uae_prefs *p, int type)
* to behave identically on all platforms if possible.
* to behave identically on all platforms if possible.
* (TW says: maybe it is time to update default config..) */
* (TW says: maybe it is time to update default config..) */
p
->
illegal_mem
=
0
;
p
->
illegal_mem
=
0
;
p
->
no_xhair
=
0
;
p
->
use_serial
=
0
;
p
->
use_serial
=
0
;
p
->
serial_demand
=
0
;
p
->
serial_demand
=
0
;
p
->
serial_hwctsrts
=
1
;
p
->
serial_hwctsrts
=
1
;
...
...
src/include/inputdevice.h
View file @
d57e527f
...
@@ -128,7 +128,6 @@ extern int getjoystickstate (int mouse);
...
@@ -128,7 +128,6 @@ extern int getjoystickstate (int mouse);
void
setmousestate
(
int
mouse
,
int
axis
,
int
data
,
int
isabs
);
void
setmousestate
(
int
mouse
,
int
axis
,
int
data
,
int
isabs
);
extern
int
getmousestate
(
int
mouse
);
extern
int
getmousestate
(
int
mouse
);
extern
void
inputdevice_updateconfig
(
struct
uae_prefs
*
prefs
);
extern
void
inputdevice_updateconfig
(
struct
uae_prefs
*
prefs
);
extern
void
inputdevice_mergeconfig
(
struct
uae_prefs
*
prefs
);
extern
void
inputdevice_devicechange
(
struct
uae_prefs
*
prefs
);
extern
void
inputdevice_devicechange
(
struct
uae_prefs
*
prefs
);
extern
int
inputdevice_translatekeycode
(
int
keyboard
,
int
scancode
,
int
state
);
extern
int
inputdevice_translatekeycode
(
int
keyboard
,
int
scancode
,
int
state
);
...
@@ -142,6 +141,7 @@ extern int inputdevice_get_compatibility_input (struct uae_prefs*, int, int*, in
...
@@ -142,6 +141,7 @@ extern int inputdevice_get_compatibility_input (struct uae_prefs*, int, int*, in
extern
struct
inputevent
*
inputdevice_get_eventinfo
(
int
evt
);
extern
struct
inputevent
*
inputdevice_get_eventinfo
(
int
evt
);
extern
void
inputdevice_get_eventname
(
const
struct
inputevent
*
ie
,
TCHAR
*
out
);
extern
void
inputdevice_get_eventname
(
const
struct
inputevent
*
ie
,
TCHAR
*
out
);
extern
void
inputdevice_compa_prepare_custom
(
struct
uae_prefs
*
prefs
,
int
index
);
extern
void
inputdevice_compa_prepare_custom
(
struct
uae_prefs
*
prefs
,
int
index
);
extern
void
inputdevice_compa_clear
(
struct
uae_prefs
*
prefs
,
int
index
);
extern
int
intputdevice_compa_get_eventtype
(
int
evt
,
int
**
axistable
);
extern
int
intputdevice_compa_get_eventtype
(
int
evt
,
int
**
axistable
);
...
...
src/include/options.h
View file @
d57e527f
...
@@ -27,6 +27,7 @@ struct strlist {
...
@@ -27,6 +27,7 @@ struct strlist {
#define MAX_INPUT_SUB_EVENT 4
#define MAX_INPUT_SUB_EVENT 4
#define MAX_INPUT_SIMULTANEOUS_KEYS 4
#define MAX_INPUT_SIMULTANEOUS_KEYS 4
// this better be here than in sound.h
#define FILTER_SOUND_OFF 0
#define FILTER_SOUND_OFF 0
#define FILTER_SOUND_EMUL 1
#define FILTER_SOUND_EMUL 1
#define FILTER_SOUND_ON 2
#define FILTER_SOUND_ON 2
...
@@ -55,6 +56,8 @@ struct jport {
...
@@ -55,6 +56,8 @@ struct jport {
};
};
#define JPORT_NONE -1
#define JPORT_NONE -1
#define JPORT_CUSTOM -2
#define JPORT_CUSTOM -2
#define JPORT_AF_NORMAL 1
#define JPORT_AF_TOGGLE 2
#define MAX_SPARE_DRIVES 20
#define MAX_SPARE_DRIVES 20
#define MAX_CUSTOM_MEMORY_ADDRS 2
#define MAX_CUSTOM_MEMORY_ADDRS 2
...
@@ -108,7 +111,6 @@ struct uae_prefs {
...
@@ -108,7 +111,6 @@ struct uae_prefs {
TCHAR
config_host_path
[
MAX_DPATH
];
TCHAR
config_host_path
[
MAX_DPATH
];
bool
illegal_mem
;
bool
illegal_mem
;
int
no_xhair
;
bool
use_serial
;
bool
use_serial
;
bool
serial_demand
;
bool
serial_demand
;
bool
serial_hwctsrts
;
bool
serial_hwctsrts
;
...
...
src/inputdevice.c
View file @
d57e527f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* joystick/mouse emulation
* joystick/mouse emulation
*
*
* Copyright 2001-20
08
Toni Wilen
* Copyright 2001-20
10
Toni Wilen
*
*
* new fetures:
* new fetures:
* - very configurable (and very complex to configure :)
* - very configurable (and very complex to configure :)
...
@@ -227,6 +227,7 @@ static void copyjport (const struct uae_prefs *src, struct uae_prefs *dst, int n
...
@@ -227,6 +227,7 @@ static void copyjport (const struct uae_prefs *src, struct uae_prefs *dst, int n
_tcscpy
(
dst
->
jports
[
num
].
name
,
src
->
jports
[
num
].
name
);
_tcscpy
(
dst
->
jports
[
num
].
name
,
src
->
jports
[
num
].
name
);
dst
->
jports
[
num
].
id
=
src
->
jports
[
num
].
id
;
dst
->
jports
[
num
].
id
=
src
->
jports
[
num
].
id
;
dst
->
jports
[
num
].
mode
=
src
->
jports
[
num
].
mode
;
dst
->
jports
[
num
].
mode
=
src
->
jports
[
num
].
mode
;
dst
->
jports
[
num
].
autofire
=
src
->
jports
[
num
].
autofire
;
}
}
static
void
out_config
(
FILE
*
f
,
int
id
,
int
num
,
const
char
*
s1
,
const
char
*
s2
)
static
void
out_config
(
FILE
*
f
,
int
id
,
int
num
,
const
char
*
s1
,
const
char
*
s2
)
...
@@ -702,7 +703,6 @@ void read_inputdevice_config (struct uae_prefs *pr, char *option, char *value)
...
@@ -702,7 +703,6 @@ void read_inputdevice_config (struct uae_prefs *pr, char *option, char *value)
if
(
joystick
<
0
)
{
if
(
joystick
<
0
)
{
num
=
getnum
(
&
p
);
num
=
getnum
(
&
p
);
for
(
keynum
=
0
;
keynum
<
MAX_INPUT_DEVICE_EVENTS
;
keynum
++
)
{
for
(
keynum
=
0
;
keynum
<
MAX_INPUT_DEVICE_EVENTS
;
keynum
++
)
{
if
(
id
->
extra
[
keynum
][
0
]
==
num
)
if
(
id
->
extra
[
keynum
][
0
]
==
num
)
break
;
break
;
...
@@ -1654,8 +1654,10 @@ uae_u8 handle_parport_joystick (int port, uae_u8 pra, uae_u8 dra)
...
@@ -1654,8 +1654,10 @@ uae_u8 handle_parport_joystick (int port, uae_u8 pra, uae_u8 dra)
case
1
:
case
1
:
v
=
((
pra
&
dra
)
|
(
dra
^
0xff
))
&
0x7
;
v
=
((
pra
&
dra
)
|
(
dra
^
0xff
))
&
0x7
;
if
(
parport_joystick_enabled
)
{
if
(
parport_joystick_enabled
)
{
if
(
getbuttonstate
(
2
,
0
))
v
&=
~
4
;
if
(
getbuttonstate
(
2
,
0
))
if
(
getbuttonstate
(
3
,
0
))
v
&=
~
1
;
v
&=
~
4
;
if
(
getbuttonstate
(
3
,
0
))
v
&=
~
1
;
}
}
return
v
;
return
v
;
default:
default:
...
@@ -1664,6 +1666,15 @@ uae_u8 handle_parport_joystick (int port, uae_u8 pra, uae_u8 dra)
...
@@ -1664,6 +1666,15 @@ uae_u8 handle_parport_joystick (int port, uae_u8 pra, uae_u8 dra)
}
}
}
}
/* p5 is 1 or floating = cd32 2-button mode */
static
bool
cd32padmode
(
uae_u16
p5dir
,
uae_u16
p5dat
)
{
if
(
!
(
potgo_value
&
p5dir
)
||
((
potgo_value
&
p5dat
)
&&
(
potgo_value
&
p5dir
)))
return
false
;
return
true
;
}
static
void
charge_cap
(
int
joy
,
int
idx
,
int
charge
)
static
void
charge_cap
(
int
joy
,
int
idx
,
int
charge
)
{
{
if
(
charge
<
-
1
||
charge
>
1
)
if
(
charge
<
-
1
||
charge
>
1
)
...
@@ -1684,10 +1695,19 @@ static void cap_check (void)
...
@@ -1684,10 +1695,19 @@ static void cap_check (void)
int
charge
=
0
,
dong
,
joypot
;
int
charge
=
0
,
dong
,
joypot
;
uae_u16
pdir
=
0x0200
<<
(
joy
*
4
+
i
*
2
);
/* output enable */
uae_u16
pdir
=
0x0200
<<
(
joy
*
4
+
i
*
2
);
/* output enable */
uae_u16
pdat
=
0x0100
<<
(
joy
*
4
+
i
*
2
);
/* data */
uae_u16
pdat
=
0x0100
<<
(
joy
*
4
+
i
*
2
);
/* data */
uae_u16
p5dir
=
0x0200
<<
(
joy
*
4
);
uae_u16
p5dat
=
0x0100
<<
(
joy
*
4
);
int
isbutton
=
getbuttonstate
(
joy
,
i
==
0
?
JOYBUTTON_3
:
JOYBUTTON_2
);
int
isbutton
=
getbuttonstate
(
joy
,
i
==
0
?
JOYBUTTON_3
:
JOYBUTTON_2
);
if
(
cd32_pad_enabled
[
joy
])
if
(
cd32_pad_enabled
[
joy
])
{
if
(
i
!=
0
)
// 3rd button?
continue
;
if
(
cd32padmode
(
p5dir
,
p5dat
))
continue
;
continue
;
// only red and blue can be read if CD32 pad and only if it is in normal pad mode
isbutton
|=
getbuttonstate
(
joy
,
JOYBUTTON_CD32_BLUE
);
}
dong
=
dongle_analogjoy
(
joy
,
i
);
dong
=
dongle_analogjoy
(
joy
,
i
);
if
(
dong
>=
0
)
{
if
(
dong
>=
0
)
{
isbutton
=
0
;
isbutton
=
0
;
...
@@ -1767,8 +1787,7 @@ uae_u8 handle_joystick_buttons (uae_u8 dra)
...
@@ -1767,8 +1787,7 @@ uae_u8 handle_joystick_buttons (uae_u8 dra)
uae_u16
p5dir
=
0x0200
<<
(
i
*
4
);
uae_u16
p5dir
=
0x0200
<<
(
i
*
4
);
uae_u16
p5dat
=
0x0100
<<
(
i
*
4
);
uae_u16
p5dat
=
0x0100
<<
(
i
*
4
);
but
|=
0x40
<<
i
;
but
|=
0x40
<<
i
;
/* Red button is connected to fire when p5 is 1 or floating */
if
(
!
cd32padmode
(
p5dir
,
p5dat
))
{
if
(
!
(
potgo_value
&
p5dir
)
||
((
potgo_value
&
p5dat
)
&&
(
potgo_value
&
p5dir
)))
{
if
(
getbuttonstate
(
i
,
JOYBUTTON_CD32_RED
))
if
(
getbuttonstate
(
i
,
JOYBUTTON_CD32_RED
))
but
&=
~
(
0x40
<<
i
);
but
&=
~
(
0x40
<<
i
);
}
}
...
@@ -1817,7 +1836,7 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor)
...
@@ -1817,7 +1836,7 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor)
uae_u16
p5dir
=
0x0200
<<
(
i
*
4
);
/* output enable P5 */
uae_u16
p5dir
=
0x0200
<<
(
i
*
4
);
/* output enable P5 */
uae_u16
p5dat
=
0x0100
<<
(
i
*
4
);
/* data P5 */
uae_u16
p5dat
=
0x0100
<<
(
i
*
4
);
/* data P5 */
if
(
cd32_pad_enabled
[
i
]
)
{
if
(
cd32_pad_enabled
[
i
]
&&
cd32padmode
(
p5dir
,
p5dat
))
{
/* p5 is floating in input-mode */
/* p5 is floating in input-mode */
potgor
&=
~
p5dat
;
potgor
&=
~
p5dat
;
...
@@ -1839,9 +1858,12 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor)
...
@@ -1839,9 +1858,12 @@ static uae_u16 handle_joystick_potgor (uae_u16 potgor)
if
(
pot_cap
[
i
][
0
]
>
100
)
if
(
pot_cap
[
i
][
0
]
>
100
)
potgor
|=
p5dat
;
potgor
|=
p5dat
;
if
(
!
cd32_pad_enabled
[
i
])
{
potgor
&=
~
p9dat
;
potgor
&=
~
p9dat
;
if
(
pot_cap
[
i
][
1
]
>
100
)
if
(
pot_cap
[
i
][
1
]
>
100
)
potgor
|=
p9dat
;
potgor
|=
p9dat
;
}
}
}
}
}
...
@@ -3356,12 +3378,20 @@ void inputdevice_compa_prepare_custom (struct uae_prefs *prefs, int index)
...
@@ -3356,12 +3378,20 @@ void inputdevice_compa_prepare_custom (struct uae_prefs *prefs, int index)
freejport
(
prefs
,
index
);
freejport
(
prefs
,
index
);
resetjport
(
prefs
,
index
);
resetjport
(
prefs
,
index
);
if
(
mode
==
0
)
if
(
mode
==
0
)
mode
=
index
==
0
?
JSEM_MODE_MOUSE
:
JSEM_MODE_JOYSTICK
;
mode
=
index
==
0
?
JSEM_MODE_MOUSE
:
(
prefs
->
cs_cd32cd
?
JSEM_MODE_JOYSTICK_CD32
:
JSEM_MODE_JOYSTICK
);
prefs
->
jports
[
index
].
mode
=
mode
;
prefs
->
jports
[
index
].
mode
=
mode
;
prefs
->
jports
[
index
].
id
=
-
2
;
prefs
->
jports
[
index
].
id
=
-
2
;
remove_compa_config
(
prefs
,
index
);
remove_compa_config
(
prefs
,
index
);
}
}
// clear device before switching to new one
void
inputdevice_compa_clear
(
struct
uae_prefs
*
prefs
,
int
index
)
{
freejport
(
prefs
,
index
);
resetjport
(
prefs
,
index
);
remove_compa_config
(
prefs
,
index
);
}
static
void
cleardev
(
struct
uae_input_device
*
uid
,
int
num
)
static
void
cleardev
(
struct
uae_input_device
*
uid
,
int
num
)
{
{
...
@@ -3369,38 +3399,13 @@ static void cleardev (struct uae_input_device *uid, int num)
...
@@ -3369,38 +3399,13 @@ static void cleardev (struct uae_input_device *uid, int num)
for
(
i
=
0
;
i
<
MAX_INPUT_DEVICE_EVENTS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_INPUT_DEVICE_EVENTS
;
i
++
)
{
for
(
j
=
0
;
j
<
MAX_INPUT_SUB_EVENT
;
j
++
)
{
for
(
j
=
0
;
j
<
MAX_INPUT_SUB_EVENT
;
j
++
)
{
uid
[
num
].
eventid
[
i
][
j
]
=
0
;
uid
[
num
].
eventid
[
i
][
j
]
=
0
;
uid
[
num
].
flags
[
i
][
j
]
=
0
;
xfree
(
uid
[
num
].
custom
[
i
][
j
]);
uid
[
num
].
custom
[
i
][
j
]
=
NULL
;
}
}
}
}
}
}
static
void
setjoyinputs
(
struct
uae_prefs
*
prefs
,
int
port
)
{
joyinputs
[
port
]
=
NULL
;
switch
(
joymodes
[
port
])
{
case
JSEM_MODE_JOYSTICK
:
if
(
port
>=
2
)
joyinputs
[
port
]
=
port
==
3
?
ip_parjoy2
:
ip_parjoy1
;
else
joyinputs
[
port
]
=
port
==
1
?
ip_joy2
:
ip_joy1
;
break
;
case
JSEM_MODE_JOYSTICK_CD32
:
joyinputs
[
port
]
=
port
?
ip_joycd322
:
ip_joycd321
;
break
;
case
JSEM_MODE_JOYSTICK_ANALOG
:
joyinputs
[
port
]
=
port
?
ip_analog2
:
ip_analog1
;
break
;
case
JSEM_MODE_MOUSE
:
joyinputs
[
port
]
=
port
?
ip_mouse2
:
ip_mouse1
;
break
;
case
JSEM_MODE_LIGHTPEN
:
joyinputs
[
port
]
=
port
?
ip_lightpen2
:
ip_lightpen1
;
break
;
case
JSEM_MODE_MOUSE_CDTV
:
joyinputs
[
port
]
=
ip_mousecdtv
;
break
;
}
}
static
void
enablejoydevice
(
struct
uae_input_device
*
uid
,
int
evtnum
)
static
void
enablejoydevice
(
struct
uae_input_device
*
uid
,
int
evtnum
)
{
{
...
@@ -3416,18 +3421,18 @@ static void enablejoydevice (struct uae_input_device *uid, int evtnum)
...
@@ -3416,18 +3421,18 @@ static void enablejoydevice (struct uae_input_device *uid, int evtnum)
static
void
setjoydevices
(
struct
uae_prefs
*
prefs
,
int
port
)
static
void
setjoydevices
(
struct
uae_prefs
*
prefs
,
int
port
)
{
{
unsigned
int
i
i
,
i
,
l
,
j
;
unsigned
int
i
,
l
,
k
,
j
;
for
(
i
i
=
0
;
joyinputs
[
port
]
&&
joyinputs
[
port
][
ii
]
>=
0
;
ii
++
)
{
for
(
i
=
0
;
joyinputs
[
port
]
&&
joyinputs
[
port
][
i
]
>=
0
;
i
++
)
{
int
evtnum
=
joyinputs
[
port
][
i
i
];
int
evtnum
=
joyinputs
[
port
][
i
];
for
(
l
=
0
;
l
<
MAX_INPUT_DEVICES
;
l
++
)
{
for
(
l
=
0
;
l
<
MAX_INPUT_DEVICES
;
l
++
)
{
enablejoydevice
(
&
prefs
->
joystick_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum
);
enablejoydevice
(
&
prefs
->
joystick_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum
);
enablejoydevice
(
&
prefs
->
mouse_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum
);
enablejoydevice
(
&
prefs
->
mouse_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum
);
enablejoydevice
(
&
prefs
->
keyboard_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum
);
enablejoydevice
(
&
prefs
->
keyboard_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum
);
}
}
for
(
i
=
0
;
axistable
[
i
]
>=
0
;
i
+=
3
)
{
for
(
k
=
0
;
axistable
[
k
]
>=
0
;
k
+=
3
)
{
if
(
evtnum
==
axistable
[
i
]
||
evtnum
==
axistable
[
i
+
1
]
||
evtnum
==
axistable
[
i
+
2
])
{
if
(
evtnum
==
axistable
[
k
]
||
evtnum
==
axistable
[
k
+
1
]
||
evtnum
==
axistable
[
k
+
2
])
{
for
(
j
=
0
;
j
<
3
;
j
++
)
{
for
(
j
=
0
;
j
<
3
;
j
++
)
{
int
evtnum2
=
axistable
[
i
+
j
];
int
evtnum2
=
axistable
[
k
+
j
];
for
(
l
=
0
;
l
<
MAX_INPUT_DEVICES
;
l
++
)
{
for
(
l
=
0
;
l
<
MAX_INPUT_DEVICES
;
l
++
)
{
enablejoydevice
(
&
prefs
->
joystick_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum2
);
enablejoydevice
(
&
prefs
->
joystick_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum2
);
enablejoydevice
(
&
prefs
->
mouse_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum2
);
enablejoydevice
(
&
prefs
->
mouse_settings
[
GAMEPORT_INPUT_SETTINGS
][
l
],
evtnum2
);
...
@@ -3441,6 +3446,35 @@ static void setjoydevices (struct uae_prefs *prefs, int port)
...
@@ -3441,6 +3446,35 @@ static void setjoydevices (struct uae_prefs *prefs, int port)
}
}
}
}
static
void
setjoyinputs
(
struct
uae_prefs
*
prefs
,
int
port
)
{
joyinputs
[
port
]
=
NULL
;
switch
(
joymodes
[
port
])
{
case
JSEM_MODE_JOYSTICK
:
if
(
port
>=
2
)
joyinputs
[
port
]
=
port
==
3
?
ip_parjoy2
:
ip_parjoy1
;
else
joyinputs
[
port
]
=
port
==
1
?
ip_joy2
:
ip_joy1
;
break
;
case
JSEM_MODE_JOYSTICK_CD32
:
joyinputs
[
port
]
=
port
?
ip_joycd322
:
ip_joycd321
;
break
;
case
JSEM_MODE_JOYSTICK_ANALOG
:
joyinputs
[
port
]
=
port
?
ip_analog2
:
ip_analog1
;
break
;
case
JSEM_MODE_MOUSE
:
joyinputs
[
port
]
=
port
?
ip_mouse2
:
ip_mouse1
;
break
;
case
JSEM_MODE_LIGHTPEN
:
joyinputs
[
port
]
=
port
?
ip_lightpen2
:
ip_lightpen1
;
break
;
case
JSEM_MODE_MOUSE_CDTV
:
joyinputs
[
port
]
=
ip_mousecdtv
;
break
;
}
}
static
void
setautofire
(
struct
uae_input_device
*
uid
,
int
port
,
int
af
)
static
void
setautofire
(
struct
uae_input_device
*
uid
,
int
port
,
int
af
)
{
{
unsigned
int
k
,
i
,
j
;
unsigned
int
k
,
i
,
j
;
...
@@ -3449,7 +3483,11 @@ static void setautofire (struct uae_input_device *uid, int port, int af)
...
@@ -3449,7 +3483,11 @@ static void setautofire (struct uae_input_device *uid, int port, int af)
for
(
i
=
0
;
i
<
MAX_INPUT_DEVICE_EVENTS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_INPUT_DEVICE_EVENTS
;
i
++
)
{
for
(
j
=
0
;
j
<
MAX_INPUT_SUB_EVENT
;
j
++
)
{
for
(
j
=
0
;
j
<
MAX_INPUT_SUB_EVENT
;
j
++
)
{
if
(
uid
->
eventid
[
i
][
j
]
==
afp
[
k
])
{
if
(
uid
->
eventid
[
i
][
j
]
==
afp
[
k
])
{
uid
->
flags
[
i
][
j
]
&=
~
(
ID_FLAG_AUTOFIRE
|
ID_FLAG_TOGGLE
);
if
(
af
>=
JPORT_AF_NORMAL
)
uid
->
flags
[
i
][
j
]
|=
ID_FLAG_AUTOFIRE
;
uid
->
flags
[
i
][
j
]
|=
ID_FLAG_AUTOFIRE
;
if
(
af
==
JPORT_AF_TOGGLE
)
uid
->
flags
[
i
][
j
]
|=
ID_FLAG_TOGGLE
;
}
}
}
}
}
}
...
@@ -3510,8 +3548,8 @@ static void compatibility_copy (struct uae_prefs *prefs)
...
@@ -3510,8 +3548,8 @@ static void compatibility_copy (struct uae_prefs *prefs)
case
JSEM_MODE_JOYSTICK_CD32
:
case
JSEM_MODE_JOYSTICK_CD32
:
default:
default:
{
{
int
iscd32
=
mode
==
JSEM_MODE_JOYSTICK_CD32
||
(
mode
==
JSEM_MODE_DEFAULT
&&
prefs
->
cs_cd32cd
);
bool
iscd32
=
mode
==
JSEM_MODE_JOYSTICK_CD32
||
(
mode
==
JSEM_MODE_DEFAULT
&&
prefs
->
cs_cd32cd
);
joymodes
[
i
]
=
mode
==
JSEM_MODE_JOYSTICK_CD32
?
JSEM_MODE_JOYSTICK_CD32
:
JSEM_MODE_JOYSTICK
;
joymodes
[
i
]
=
iscd32
?
JSEM_MODE_JOYSTICK_CD32
:
JSEM_MODE_JOYSTICK
;
if
(
!
iscd32
)
if
(
!
iscd32
)
joyinputs
[
i
]
=
i
?
ip_joy2
:
ip_joy1
;
joyinputs
[
i
]
=
i
?
ip_joy2
:
ip_joy1
;
else
else
...
@@ -3536,7 +3574,7 @@ static void compatibility_copy (struct uae_prefs *prefs)
...
@@ -3536,7 +3574,7 @@ static void compatibility_copy (struct uae_prefs *prefs)
break
;
break
;
}
}
}
else
if
(
prefs
->
jports
[
i
].
id
>=
0
)
{
}
else
if
(
prefs
->
jports
[
i
].
id
>=
0
)
{
prefs
->
jports
[
i
].
mode
=
joymodes
[
i
]
=
i
?
JSEM_MODE_JOYSTICK
:
JSEM_MODE_MOUSE
;
joymodes
[
i
]
=
i
?
JSEM_MODE_JOYSTICK
:
JSEM_MODE_MOUSE
;
joyinputs
[
i
]
=
i
?
ip_joy2
:
ip_mouse1
;
joyinputs
[
i
]
=
i
?
ip_joy2
:
ip_mouse1
;
}
}
}
}
...
@@ -3597,9 +3635,9 @@ static void compatibility_copy (struct uae_prefs *prefs)
...
@@ -3597,9 +3635,9 @@ static void compatibility_copy (struct uae_prefs *prefs)
case
JSEM_MODE_JOYSTICK_CD32
:
case
JSEM_MODE_JOYSTICK_CD32
:
default:
default:
{
{
int
iscd32
=
mode
==
JSEM_MODE_JOYSTICK_CD32
||
(
mode
==
JSEM_MODE_DEFAULT
&&
prefs
->
cs_cd32cd
);
bool
iscd32
=
mode
==
JSEM_MODE_JOYSTICK_CD32
||
(
mode
==
JSEM_MODE_DEFAULT
&&
prefs
->
cs_cd32cd
);
input_get_default_joystick
(
joysticks
,
joy
,
i
,
iscd32
?
JSEM_MODE_JOYSTICK_CD32
:
0
);
input_get_default_joystick
(
joysticks
,
joy
,
i
,
iscd32
?
JSEM_MODE_JOYSTICK_CD32
:
0
);
joymodes
[
i
]
=
mode
==
JSEM_MODE_JOYSTICK_CD32
?
JSEM_MODE_JOYSTICK_CD32
:
JSEM_MODE_JOYSTICK
;
joymodes
[
i
]
=
iscd32
?
JSEM_MODE_JOYSTICK_CD32
:
JSEM_MODE_JOYSTICK
;
break
;
break
;
}
}
case
JSEM_MODE_JOYSTICK_ANALOG
:
case
JSEM_MODE_JOYSTICK_ANALOG
:
...
@@ -3645,7 +3683,7 @@ static void compatibility_copy (struct uae_prefs *prefs)
...
@@ -3645,7 +3683,7 @@ static void compatibility_copy (struct uae_prefs *prefs)
int
mode
=
prefs
->
jports
[
i
].
mode
;
int
mode
=
prefs
->
jports
[
i
].
mode
;
for
(
joy
=
0
;
used
[
joy
];
joy
++
);
for
(
joy
=
0
;
used
[
joy
];
joy
++
);
if
(
JSEM_ISANYKBD
(
i
,
prefs
))
{
if
(
JSEM_ISANYKBD
(
i
,
prefs
))
{
int
cd32
=
mode
==
JSEM_MODE_JOYSTICK_CD32
||
(
mode
==
JSEM_MODE_DEFAULT
&&
prefs
->
cs_cd32cd
);
bool
cd32
=
mode
==
JSEM_MODE_JOYSTICK_CD32
||
(
mode
==
JSEM_MODE_DEFAULT
&&
prefs
->
cs_cd32cd
);
if
(
JSEM_ISNUMPAD
(
i
,
prefs
))
{
if
(
JSEM_ISNUMPAD
(
i
,
prefs
))
{
if
(
cd32
)
if
(
cd32
)
kb
=
keyboard_default_kbmaps
[
KBR_DEFAULT_MAP_CD32_NP
];
kb
=
keyboard_default_kbmaps
[
KBR_DEFAULT_MAP_CD32_NP
];
...
@@ -3735,10 +3773,8 @@ static void compatibility_copy (struct uae_prefs *prefs)
...
@@ -3735,10 +3773,8 @@ static void compatibility_copy (struct uae_prefs *prefs)
}
}
}
}
}
}
for
(
i
=
0
;
i
<
MAX_JPORTS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_JPORTS
;
i
++
)
if
(
prefs
->
jports
[
i
].
autofire
)
setautofires
(
prefs
,
i
,
prefs
->
jports
[
i
].
autofire
);
setautofires
(
prefs
,
i
,
prefs
->
jports
[
i
].
autofire
);
}
for
(
i
=
0
;
i
<
MAX_JPORTS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_JPORTS
;
i
++
)
{
setjoyinputs
(
prefs
,
i
);
setjoyinputs
(
prefs
,
i
);
...
@@ -3821,7 +3857,7 @@ static void matchdevices_all (struct uae_prefs *prefs)
...
@@ -3821,7 +3857,7 @@ static void matchdevices_all (struct uae_prefs *prefs)
}
}
}
}
static
void
inputdevice_updateconfig2
(
struct
uae_prefs
*
prefs
)
void
inputdevice_updateconfig
(
struct
uae_prefs
*
prefs
)
{
{
int
i
;
int
i
;
...
@@ -3892,16 +3928,6 @@ static void inputdevice_updateconfig2 (struct uae_prefs *prefs)
...
@@ -3892,16 +3928,6 @@ static void inputdevice_updateconfig2 (struct uae_prefs *prefs)
config_changed
=
1
;
config_changed
=
1
;
}
}
void
inputdevice_mergeconfig
(
struct
uae_prefs
*
prefs
)
{
inputdevice_updateconfig2
(
prefs
);
}
void
inputdevice_updateconfig
(
struct
uae_prefs
*
prefs
)
{
inputdevice_updateconfig2
(
prefs
);
}
/* called when devices get inserted or removed
/* called when devices get inserted or removed
* store old devices temporarily, enumerate all devices
* store old devices temporarily, enumerate all devices
* restore old devices back (order may have changed)
* restore old devices back (order may have changed)
...
@@ -4537,7 +4563,6 @@ static void swapjoydevice (struct uae_input_device *uid, int **swaps)
...
@@ -4537,7 +4563,6 @@ static void swapjoydevice (struct uae_input_device *uid, int **swaps)
uid
->
eventid
[
i
][
j
]
=
swaps
[
1
-
k
][
kk
];
uid
->
eventid
[
i
][
j
]
=
swaps
[
1
-
k
][
kk
];
found
=
true
;
found
=
true
;
}
else
{
}
else
{
#if 1
for
(
jj
=
0
;
axistable
[
jj
]
>=
0
;
jj
+=
3
)
{
for
(
jj
=
0
;
axistable
[
jj
]
>=
0
;
jj
+=
3
)
{
if
(
evtnum
==
axistable
[
jj
]
||
evtnum
==
axistable
[
jj
+
1
]
||
evtnum
==
axistable
[
jj
+
2
])
{
if
(
evtnum
==
axistable
[
jj
]
||
evtnum
==
axistable
[
jj
+
1
]
||
evtnum
==
axistable
[
jj
+
2
])
{
for
(
ii
=
0
;
ii
<
3
;
ii
++
)
{
for
(
ii
=
0
;
ii
<
3
;
ii
++
)
{
...
@@ -4553,7 +4578,6 @@ static void swapjoydevice (struct uae_input_device *uid, int **swaps)
...
@@ -4553,7 +4578,6 @@ static void swapjoydevice (struct uae_input_device *uid, int **swaps)
}
}
}
}
}
}
#endif
}
}
}
}
}
}
...
@@ -4768,6 +4792,8 @@ void setjoybuttonstate (int joy, int button, int state)
...
@@ -4768,6 +4792,8 @@ void setjoybuttonstate (int joy, int button, int state)
{
{
if
(
testmode
)
{
if
(
testmode
)
{
inputdevice_testrecord
(
IDTYPE_JOYSTICK
,
joy
,
IDEV_WIDGET_BUTTON
,
button
,
state
);
inputdevice_testrecord
(
IDTYPE_JOYSTICK
,
joy
,
IDEV_WIDGET_BUTTON
,
button
,
state
);
if
(
state
<
0
)
inputdevice_testrecord
(
IDTYPE_JOYSTICK
,
joy
,
IDEV_WIDGET_BUTTON
,
button
,
0
);
return
;
return
;
}
}
#if 0
#if 0
...
...
src/tools/config.log
View file @
d57e527f
...
@@ -445,7 +445,7 @@ configure:4344: $? = 0
...
@@ -445,7 +445,7 @@ configure:4344: $? = 0
configure:4344: result: yes
configure:4344: result: yes
configure:4350: checking for _doprnt
configure:4350: checking for _doprnt
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
configure:4350: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
duySMn
.o: In function `main':
/tmp/cc
9SecbZ
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
/home/gnostic/puaex/src/tools/conftest.c:67: undefined reference to `_doprnt'
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
configure:4350: $? = 1
configure:4350: $? = 1
...
@@ -533,7 +533,7 @@ configure:4364: $? = 0
...
@@ -533,7 +533,7 @@ configure:4364: $? = 0
configure:4364: result: yes
configure:4364: result: yes
configure:4364: checking for strcmpi
configure:4364: checking for strcmpi
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
gpaTxE
.o: In function `main':
/tmp/cc
XI8Zie
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `strcmpi'
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
configure:4364: $? = 1
configure:4364: $? = 1
...
@@ -613,7 +613,7 @@ configure: failed program was:
...
@@ -613,7 +613,7 @@ configure: failed program was:
configure:4364: result: no
configure:4364: result: no
configure:4364: checking for stricmp
configure:4364: checking for stricmp
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
configure:4364: gcc -o conftest -g -O2 -Wall -W -Wno-unused conftest.c >&5
/tmp/cc
AjejvH
.o: In function `main':
/tmp/cc
aQV0Wi
.o: In function `main':
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
/home/gnostic/puaex/src/tools/conftest.c:69: undefined reference to `stricmp'
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
configure:4364: $? = 1
configure:4364: $? = 1
...
...
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