mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-14 07:35:12 +01:00
Fix warnings and remove SAM
This commit is contained in:
parent
c5b7b8e539
commit
51aa03ce04
@ -32,7 +32,7 @@ LDFLAGS ?= $(GCOV) `sdl-config --libs` -lSDL_ttf -lSDL_image
|
|||||||
|
|
||||||
CPP_SRCS=Src/C64_SC.cpp Src/main.cpp Src/Display.cpp Src/Prefs.cpp Src/SID.cpp \
|
CPP_SRCS=Src/C64_SC.cpp Src/main.cpp Src/Display.cpp Src/Prefs.cpp Src/SID.cpp \
|
||||||
Src/REU.cpp Src/IEC.cpp Src/1541fs.cpp Src/1541d64.cpp Src/1541t64.cpp \
|
Src/REU.cpp Src/IEC.cpp Src/1541fs.cpp Src/1541d64.cpp Src/1541t64.cpp \
|
||||||
Src/1541job.cpp Src/SAM.cpp Src/CPUC64_SC.cpp Src/VIC_SC.cpp \
|
Src/1541job.cpp Src/CPUC64_SC.cpp Src/VIC_SC.cpp \
|
||||||
Src/CIA_SC.cpp Src/CPU1541_SC.cpp Src/CPU_common.cpp Src/Network.cpp \
|
Src/CIA_SC.cpp Src/CPU1541_SC.cpp Src/CPU_common.cpp Src/Network.cpp \
|
||||||
Src/gui/menu_messages.cpp Src/gui/dialogue_box.cpp Src/gui/widget.cpp \
|
Src/gui/menu_messages.cpp Src/gui/dialogue_box.cpp Src/gui/widget.cpp \
|
||||||
Src/gui/game_info.cpp Src/gui/status_bar.cpp Src/gui/gui.cpp Src/gui/listener.cpp \
|
Src/gui/game_info.cpp Src/gui/status_bar.cpp Src/gui/gui.cpp Src/gui/listener.cpp \
|
||||||
|
25
Src/IEC.cpp
25
Src/IEC.cpp
@ -93,6 +93,8 @@ Drive *IEC::create_drive(const char *path)
|
|||||||
// print error?
|
// print error?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEC::IEC(C64Display *display) : the_display(display)
|
IEC::IEC(C64Display *display) : the_display(display)
|
||||||
@ -880,7 +882,7 @@ void Drive::unsupp_cmd(void)
|
|||||||
|
|
||||||
uint8 ascii2petscii(char c)
|
uint8 ascii2petscii(char c)
|
||||||
{
|
{
|
||||||
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
|
if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))
|
||||||
return c ^ 0x20;
|
return c ^ 0x20;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
@ -892,7 +894,7 @@ void ascii2petscii(uint8 *dest, const char *src, int n)
|
|||||||
|
|
||||||
char petscii2ascii(uint8 c)
|
char petscii2ascii(uint8 c)
|
||||||
{
|
{
|
||||||
if ((c >= 'A') && (c <= 'Z') || (c >= 'a') && (c <= 'z'))
|
if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))
|
||||||
return c ^ 0x20;
|
return c ^ 0x20;
|
||||||
if ((c >= 0xc1) && (c <= 0xda))
|
if ((c >= 0xc1) && (c <= 0xda))
|
||||||
return c ^ 0x80;
|
return c ^ 0x80;
|
||||||
@ -911,6 +913,9 @@ void petscii2ascii(char *dest, const uint8 *src, int n)
|
|||||||
|
|
||||||
bool IsMountableFile(const char *path, int &type)
|
bool IsMountableFile(const char *path, int &type)
|
||||||
{
|
{
|
||||||
|
size_t n;
|
||||||
|
bool out = true;
|
||||||
|
|
||||||
// Read header and determine file size
|
// Read header and determine file size
|
||||||
uint8 header[64];
|
uint8 header[64];
|
||||||
memset(header, 0, sizeof(header));
|
memset(header, 0, sizeof(header));
|
||||||
@ -920,17 +925,19 @@ bool IsMountableFile(const char *path, int &type)
|
|||||||
fseek(f, 0, SEEK_END);
|
fseek(f, 0, SEEK_END);
|
||||||
long size = ftell(f);
|
long size = ftell(f);
|
||||||
fseek(f, 0, SEEK_SET);
|
fseek(f, 0, SEEK_SET);
|
||||||
fread(header, 1, sizeof(header), f);
|
n = fread(header, 1, sizeof(header), f);
|
||||||
|
if (n != 1)
|
||||||
|
out = false;
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
if (IsImageFile(path, header, size)) {
|
if (IsImageFile(path, header, size))
|
||||||
type = FILE_IMAGE;
|
type = FILE_IMAGE;
|
||||||
return true;
|
else if (IsArchFile(path, header, size))
|
||||||
} else if (IsArchFile(path, header, size)) {
|
|
||||||
type = FILE_ARCH;
|
type = FILE_ARCH;
|
||||||
return true;
|
else
|
||||||
} else
|
out = false;
|
||||||
return false;
|
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user