(PSP1) Compile in custom getopt, still crashes somewher around file.c

This commit is contained in:
twinaphex 2012-11-28 15:11:27 +01:00
parent 050627ba93
commit 7ccd663bca
4 changed files with 20 additions and 2 deletions

View File

@ -8,7 +8,7 @@ INCDIR =
CFLAGS = -O2 -G0 -Wall -g -std=gnu99 -ffast-math
ASFLAGS = $(CFLAGS)
RARCH_DEFINES = -DPSP -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_GETOPT_LONG -DHAVE_FILEBROWSER -DHAVE_RARCH_MAIN_WRAP -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_CONFIGFILE=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main
RARCH_DEFINES = -DPSP -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_FILEBROWSER -DHAVE_RARCH_MAIN_WRAP -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_CONFIGFILE=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main
ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER

View File

@ -33,6 +33,14 @@ int rarch_main(int argc, char *argv[]);
static int exit_callback(int arg1, int arg2, void *common)
{
g_extern.verbose = false;
#ifdef HAVE_FILE_LOGGER
if (g_extern.log_file)
fclose(g_extern.log_file);
g_extern.log_file = NULL;
#endif
sceKernelExitGame();
return 0;
}
@ -152,12 +160,21 @@ begin_loop:
{
bool repeat = false;
RARCH_LOG("Gets to: #2.0\n");
input_psp.poll(NULL);
RARCH_LOG("Gets to: #2.1\n");
driver.video->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
RARCH_LOG("Gets to: #2.2\n");
int count = 0;
do{
repeat = rarch_main_iterate();
RARCH_LOG("Iterate: %d\n", count++);
}while(repeat && !g_extern.console.screen.state.frame_advance.enable);
}
else if(g_extern.console.rmenu.mode == MODE_MENU)

View File

@ -171,6 +171,7 @@ static bool psp_key_pressed(void *data, int key)
switch (key)
{
case RARCH_QUIT_KEY:
RARCH_LOG("Got to here once.\n");
return true;
default:
return false;

View File

@ -123,6 +123,7 @@ static bool psp_frame(void *data, const void *frame,
if(!frame)
return true;
#if 0
psp1_video_t *vid = (psp1_video_t*)data;
sceKernelDcacheWritebackInvalidateAll();
@ -143,7 +144,6 @@ static bool psp_frame(void *data, const void *frame,
sceDisplayWaitVblankStart();
#if 0
void *frame_ptr = &frame;
DisplaySetFrameBuf(frame_ptr, pitch,
vid->rgb32 ? PSP_DISPLAY_PIXEL_FORMAT_8888 : PSP_DISPLAY_PIXEL_FORMAT_565,