diff --git a/.gitignore b/.gitignore index 5020d2448..00b4bcd5e 100644 --- a/.gitignore +++ b/.gitignore @@ -53,9 +53,10 @@ build-ps2/ build-ps3/ build-psp/ build-vita/ -eboot.pbp -eboot.bin +EBOOT.PBP +PARAM.SFO param.sfo +eboot.bin # Build results [Dd]ebug/ diff --git a/misc/linux/min-XF86keysym.h b/misc/linux/min-XF86keysym.h new file mode 100644 index 000000000..a2d60e739 --- /dev/null +++ b/misc/linux/min-XF86keysym.h @@ -0,0 +1,49 @@ +/* + * XFree86 vendor specific keysyms. + * + * The XFree86 keysym range is 0x10080001 - 0x1008FFFF. + * + * The XF86 set of keysyms is a catch-all set of defines for keysyms found + * on various multimedia keyboards. Originally specific to XFree86 they have + * been been adopted over time and are considered a "standard" part of X + * keysym definitions. + * XFree86 never properly commented these keysyms, so we have done our + * best to explain the semantic meaning of these keys. + * + * XFree86 has removed their mail archives of the period, that might have + * shed more light on some of these definitions. Until/unless we resurrect + * these archives, these are from memory and usage. + */ + +/* + * Keys found on some "Internet" keyboards. + */ +#define XF86XK_Standby 0x1008FF10 /* System into standby mode */ +#define XF86XK_AudioLowerVolume 0x1008FF11 /* Volume control down */ +#define XF86XK_AudioMute 0x1008FF12 /* Mute sound from the system */ +#define XF86XK_AudioRaiseVolume 0x1008FF13 /* Volume control up */ +#define XF86XK_AudioPlay 0x1008FF14 /* Start playing of audio > */ +#define XF86XK_AudioStop 0x1008FF15 /* Stop playing audio */ +#define XF86XK_AudioPrev 0x1008FF16 /* Previous track */ +#define XF86XK_AudioNext 0x1008FF17 /* Next track */ +#define XF86XK_HomePage 0x1008FF18 /* Display user's home page */ +#define XF86XK_Mail 0x1008FF19 /* Invoke user's mail program */ +#define XF86XK_Start 0x1008FF1A /* Start application */ +#define XF86XK_Search 0x1008FF1B /* Search */ + +/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */ +#define XF86XK_Calculator 0x1008FF1D /* Invoke calculator program */ + +/* Some more "Internet" keyboard symbols */ +#define XF86XK_Back 0x1008FF26 /* Like back on a browser */ +#define XF86XK_Forward 0x1008FF27 /* Like forward on a browser */ +#define XF86XK_Stop 0x1008FF28 /* Stop current operation */ +#define XF86XK_Refresh 0x1008FF29 /* Refresh the page */ +#define XF86XK_PowerOff 0x1008FF2A /* Power off system entirely */ +#define XF86XK_WakeUp 0x1008FF2B /* Wake up system from sleep */ + +#define XF86XK_Sleep 0x1008FF2F /* Put system to sleep */ +#define XF86XK_Favorites 0x1008FF30 /* Show favorite locations */ +#define XF86XK_AudioPause 0x1008FF31 /* Pause audio playing */ +#define XF86XK_AudioMedia 0x1008FF32 /* Launch media collection app */ +#define XF86XK_MyComputer 0x1008FF33 /* Display "My Computer" window */ diff --git a/misc/psp/ICON0.png b/misc/psp/ICON0.png new file mode 100644 index 000000000..fe9cb22e9 Binary files /dev/null and b/misc/psp/ICON0.png differ diff --git a/misc/psp/Makefile b/misc/psp/Makefile index 45dde8440..61f8e53b9 100644 --- a/misc/psp/Makefile +++ b/misc/psp/Makefile @@ -14,6 +14,13 @@ BUILD_PRX = 1 EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = ClassiCube +PSP_EBOOT_ICON = misc/psp/ICON0.png + +ifeq ($(strip $(PSPSDK)),) +$(warning "Please set PSPSDK variables in your environment. For example:") +$(warning export PSPSDK=/usr/local/pspsk/psp/sdk) +$(warning export PATH=/usr/local/pspsk/bin:$$PATH) +$(error Failed to find PSPSDK installation) +endif -PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak diff --git a/src/Platform_Posix.c b/src/Platform_Posix.c index edc5b3662..57283aaf7 100644 --- a/src/Platform_Posix.c +++ b/src/Platform_Posix.c @@ -35,6 +35,7 @@ const cc_result ReturnCode_FileNotFound = ENOENT; const cc_result ReturnCode_SocketInProgess = EINPROGRESS; const cc_result ReturnCode_SocketWouldBlock = EWOULDBLOCK; const cc_result ReturnCode_DirectoryExists = EEXIST; +#define SUPPORTS_GETADDRINFO 1 #if defined CC_BUILD_ANDROID const char* Platform_AppNameSuffix = " android alpha"; @@ -576,6 +577,7 @@ union SocketAddress { /* Sanity check to ensure cc_sockaddr struct is large enough to contain all socket addresses supported by this platform */ static char sockaddr_size_check[sizeof(union SocketAddress) < CC_SOCKETADDR_MAXSIZE ? 1 : -1]; +#if SUPPORTS_GETADDRINFO static cc_result ParseHost(const char* host, int port, cc_sockaddr* addrs, int* numValidAddrs) { char portRaw[32]; cc_string portStr; struct addrinfo hints = { 0 }; @@ -611,6 +613,33 @@ static cc_result ParseHost(const char* host, int port, cc_sockaddr* addrs, int* *numValidAddrs = i; return i == 0 ? ERR_INVALID_ARGUMENT : 0; } +#else +static cc_result ParseHost(const char* host, int port, cc_sockaddr* addrs, int* numValidAddrs) { + struct hostent* res = gethostbyname(host); + struct sockaddr_in* addr4; + char* src_addr; + int i; + + // Must have at least one IPv4 address + if (res->h_addrtype != AF_INET) return ERR_INVALID_ARGUMENT; + if (!res->h_addr_list) return ERR_INVALID_ARGUMENT; + + for (i = 0; i < SOCKET_MAX_ADDRS; i++) + { + src_addr = res->h_addr_list[i]; + if (!src_addr) break; + addrs[i].size = sizeof(struct sockaddr_in); + + addr4 = (struct sockaddr_in*)addrs[i].data; + addr4->sin_family = AF_INET; + addr4->sin_port = htons(port); + addr4->sin_addr = *(struct in_addr*)src_addr; + } + + *numValidAddrs = i; + return i == 0 ? ERR_INVALID_ARGUMENT : 0; +} +#endif cc_result Socket_ParseAddress(const cc_string* address, int port, cc_sockaddr* addrs, int* numValidAddrs) { union SocketAddress* addr = (union SocketAddress*)addrs[0].data; diff --git a/src/Window_X11.c b/src/Window_X11.c index 5fd367eec..8efb60e7d 100644 --- a/src/Window_X11.c +++ b/src/Window_X11.c @@ -21,7 +21,7 @@ #include "../misc/linux/min-xutil.h" #include "../misc/linux/min-xkblib.h" #include "../misc/linux/min-xinput2.h" -#include +#include "../misc/linux/min-XF86keysym.h" #include #ifdef X_HAVE_UTF8_STRING diff --git a/src/freetype/ftconfig.h b/src/freetype/ftconfig.h index 66f9a6f74..715d58f2b 100644 --- a/src/freetype/ftconfig.h +++ b/src/freetype/ftconfig.h @@ -45,8 +45,8 @@ FT_BEGIN_HEADER -/* ClassiCube patch - don't export FreeType symbols to avoid conflicting with system */ -#if defined(__GNUC__) && !defined(_WIN32) +/* ClassiCube patch - don't export FreeType symbols in debug builds to avoid conflicting with system */ +#if defined(__GNUC__) && !defined(_WIN32) && !defined(__sun__) #define FT_EXPORT( x ) __attribute__((visibility("hidden"))) extern x #define FT_BASE( x ) __attribute__((visibility("hidden"))) extern x #elif defined(__cplusplus)