Fixed t64 tempfile bug again and make a proper fix of the multiple-keybindings bug

This commit is contained in:
simon.kagstrom 2009-01-16 16:56:56 +00:00
parent 05ac9a860d
commit 44ff382b17
4 changed files with 29 additions and 19 deletions

View File

@ -1,7 +1,6 @@
version 4:
* Fixed + and - bindings on the wiimote and a keybinding bug which caused
keypresses to go unnoticed. Keys are now handled in turn, i.e., not on
each vblank
keypresses to go unnoticed.
* Build the SC version of frodo, which makes some more games work or
some work better. For example, I *think* that the sound in Exploding

View File

@ -220,8 +220,13 @@ uint8 ArchDrive::open_file(int channel, const uint8 *name, int name_len)
if (find_first_file(plain_name, plain_name_len, num)) {
// Open temporary file
if ((file[channel] = tmpfile()) != NULL) {
if ((file[channel] =
#if defined(GEKKO)
fopen("/apps/frodo/tmp/a", "w+")
#else
tmpfile()
#endif
) != NULL) {
// Write load address (.t64 only)
if (archive_type == TYPE_T64) {
fwrite(&file_info[num].sa_lo, 1, 1, file[channel]);

View File

@ -645,21 +645,27 @@ uint8 C64::poll_joystick(int port)
extra_keys[WIIMOTE_MINUS] = ((held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_PLUS) |
(held | held_other) & WPAD_BUTTON_MINUS;
static int whose_turn;
int kc = ThePrefs.JoystickKeyBinding[whose_turn];
for (int i = 0; i < N_WIIMOTE_BINDINGS; i++)
{
static bool is_pressed[N_WIIMOTE_BINDINGS];
int kc = ThePrefs.JoystickKeyBinding[i];
if ( kc >= 0)
{
if (extra_keys[whose_turn])
if (extra_keys[i])
{
TheDisplay->UpdateKeyMatrix(kc, false,
TheCIA1->KeyMatrix, TheCIA1->RevMatrix);
else
is_pressed[i] = true;
}
else if (is_pressed[i])
{
TheDisplay->UpdateKeyMatrix(kc, true,
TheCIA1->KeyMatrix, TheCIA1->RevMatrix);
is_pressed[i] = false;
}
}
}
whose_turn++;
if (whose_turn >= N_WIIMOTE_BINDINGS)
whose_turn = 0;
return j;
#else

View File

@ -3,7 +3,7 @@
<name>Frodo</name>
<coder>Simon Kagstrom</coder>
<version>4</version>
<release_date>20090111</release_date>
<release_date>20090116</release_date>
<short_description>Commodore 64 emulator</short_description>
<long_description>Frodo is a C64 emulator written by Christian Bauer. It supports C64 disk and tape images in the .d64, .t64 and .prg formats. The port to Wii was done by Simon Kagstrom.</long_description>
</app>