(PS3) Cleaned up Salamander

This commit is contained in:
TwinAphex51224 2012-02-28 11:09:43 +01:00
parent c5cee1f945
commit 308d89ead7
2 changed files with 1 additions and 25 deletions

View File

@ -17,7 +17,7 @@ MOVE = mv
C = $(CELL_HOST_PATH)/ppu/bin/ppu-lv2-gcc
CC = $(CELL_HOST_PATH)/ppu/bin/ppu-lv2-g++
PPU_CFLAGS += -I. -O2 -g -DHAVE_EXITSPAWN_NPDRM
PPU_CFLAGS += -I. -O2 -g
PPU_SRCS = ps3/salamander/main.c strl.c conf/config_file.c
ifeq ($(HAVE_LOGGER), 1)

View File

@ -20,11 +20,9 @@
#include <cell/sysmodule.h>
#include <sysutil/sysutil_gamecontent.h>
#include <sys/process.h>
#ifdef HAVE_EXITSPAWN_NPDRM
#include <netex/net.h>
#include <np.h>
#include <np/drm.h>
#endif
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
@ -59,9 +57,7 @@
} while (0)
#endif
#ifdef HAVE_EXITSPAWN_NPDRM
static uint8_t np_pool[NP_POOL_SIZE];
#endif
char contentInfoPath[MAX_PATH_LENGTH];
char usrDirPath[MAX_PATH_LENGTH];
char LIBSNES_DIR_PATH[MAX_PATH_LENGTH];
@ -274,34 +270,24 @@ static void get_environment_settings (void)
int main(int argc, char *argv[])
{
CellPadData pad_data;
#ifdef HAVE_EXITSPAWN_NPDRM
char spawn_data[256], spawn_data_size[16];
SceNpDrmKey * k_licensee = NULL;
#endif
int ret;
cellSysmoduleLoadModule(CELL_SYSMODULE_IO);
cellSysmoduleLoadModule(CELL_SYSMODULE_FS);
cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_GAME);
#if defined(HAVE_EXITSPAWN_NPDRM) || defined(HAVE_LOGGER)
cellSysmoduleLoadModule(CELL_SYSMODULE_NET);
#endif
#ifdef HAVE_EXITSPAWN_NPDRM
cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_NP);
#endif
#if defined(HAVE_EXITSPAWN_NPDRM) || defined(HAVE_LOGGER)
sys_net_initialize_network();
#endif
#ifdef HAVE_LOGGER
logger_init();
#endif
#ifdef HAVE_EXITSPAWN_NPDRM
sceNpInit(NP_POOL_SIZE, np_pool);
#endif
get_environment_settings();
@ -327,7 +313,6 @@ int main(int argc, char *argv[])
logger_shutdown();
#endif
#ifdef HAVE_EXITSPAWN_NPDRM
for(unsigned int i = 0; i < sizeof(spawn_data); ++i)
spawn_data[i] = i & 0xff;
@ -349,21 +334,12 @@ int main(int argc, char *argv[])
}
sceNpTerm();
#else
sys_game_process_exitspawn2((char*)libsnes_path, NULL, NULL, NULL, 0, 1000, SYS_PROCESS_PRIMARY_STACK_SIZE_1M);
#endif
#if defined(HAVE_EXITSPAWN_NPDRM) || defined(HAVE_LOGGER)
sys_net_finalize_network();
#endif
#ifdef HAVE_EXITSPAWN_NPDRM
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_NP);
#endif
#if defined(HAVE_EXITSPAWN_NPDRM) || defined(HAVE_LOGGER)
cellSysmoduleUnloadModule(CELL_SYSMODULE_NET);
#endif
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_GAME);
cellSysmoduleLoadModule(CELL_SYSMODULE_FS);
cellSysmoduleLoadModule(CELL_SYSMODULE_IO);