Skip to content

Commit

Permalink
(PSP1) Compile in custom getopt, still crashes somewher around file.c
Browse files Browse the repository at this point in the history
  • Loading branch information
twinaphex committed Nov 28, 2012
1 parent 050627b commit 7ccd663
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.psp1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions psp/frontend/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -152,12 +160,21 @@ int main(int argc, char *argv[])
{
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)
Expand Down
1 change: 1 addition & 0 deletions psp/psp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion psp1/psp1_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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,
Expand Down

0 comments on commit 7ccd663

Please sign in to comment.