static void salamander_init(void) { CellPadData pad_data; cellPadInit(7); cellPadGetData(0, &pad_data); if(pad_data.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_TRIANGLE) { //override path, boot first executable in cores directory RARCH_LOG("Fallback - Will boot first executable in RetroArch cores/ directory.\n"); find_and_set_first_file(); } else { //normal executable loading path char tmp_str[PATH_MAX]; bool config_file_exists = false; if (path_file_exists(config_path)) config_file_exists = true; //try to find CORE executable char core_executable[1024]; fill_pathname_join(core_executable, default_paths.core_dir, "CORE.SELF", sizeof(core_executable)); if(path_file_exists(core_executable)) { //Start CORE executable strlcpy(libretro_path, core_executable, sizeof(libretro_path)); RARCH_LOG("Start [%s].\n", libretro_path); } else { if (config_file_exists) { config_file_t * conf = config_file_new(config_path); config_get_array(conf, "libretro_path", tmp_str, sizeof(tmp_str)); config_file_free(conf); strlcpy(libretro_path, tmp_str, sizeof(libretro_path)); } if (!config_file_exists || !strcmp(libretro_path, "")) find_and_set_first_file(); else RARCH_LOG("Start [%s] found in retroarch.cfg.\n", libretro_path); if (!config_file_exists) { config_file_t *new_conf = config_file_new(NULL); config_set_string(new_conf, "libretro_path", libretro_path); config_file_write(new_conf, config_path); config_file_free(new_conf); } } } cellPadEnd(); }
static void ps3_input_free_input(void *data) { ps3_input_t *ps3 = (ps3_input_t*)data; if (!ps3) return; cellPadEnd(); #ifdef HAVE_MOUSE cellMouseEnd(); #endif free(data); }
static void ps3_input_free_input(void *data) { if (!data) return; #ifndef __CELLOS_LV2__ cellPadEnd(); #endif #ifdef HAVE_MOUSE //cellMouseEnd(); #endif }
/*********IMPLEMENTATIONS***************/ static void CELL_DeleteDevice (SDL_VideoDevice *device) { CELL_RC_DumpData(); #ifndef CELL_NO_SOFT_INPUT CELL_CURSOR_Free(0, CELL_Video.OSK.Cursor); #endif CELL_PSGL_Kill(device); SDL_free(device); cellKbEnd(); cellMouseEnd(); cellPadEnd(); }
int32_t CellInputFacade::Deinit() { return cellPadEnd(); }
//----------------------------------------------------------------------------- // Purpose: Shutdown the game engine //----------------------------------------------------------------------------- void CGameEnginePS3::Shutdown() { // Flag that we are shutting down so the frame loop will stop running m_bShuttingDown = true; // Shutdown dbg font library if ( m_DbgFontConsoleID >= 0 ) { cellDbgFontConsoleClose( m_DbgFontConsoleID ); cellDbgFontExit(); } // Should be safe to call even if we didn't actually init. cellPadEnd(); // PS3 docs say it's best not to call this and allow the os/vshell to handle it instead to avoid brief noise // in the video display if ( m_rgflPointsData ) { delete[] m_rgflPointsData; m_rgflPointsData = NULL; } if ( m_rgflPointsColorData ) { delete[] m_rgflPointsColorData; m_rgflPointsColorData = NULL; } if ( m_rgflLinesData ) { delete[] m_rgflLinesData; m_rgflLinesData = NULL; } if ( m_rgflLinesColorData ) { delete[] m_rgflLinesColorData; m_rgflLinesColorData = NULL; } if ( m_rgflQuadsData ) { delete[] m_rgflQuadsData; m_rgflQuadsData = NULL; } if ( m_rgflQuadsColorData ) { delete[] m_rgflQuadsColorData; m_rgflQuadsColorData = NULL; } if ( m_rgflQuadsTextureData ) { delete[] m_rgflQuadsTextureData; m_rgflQuadsTextureData = NULL; } m_dwLinesToFlush = 0; m_dwPointsToFlush = 0; m_dwQuadsToFlush = 0; /* // PS3 docs say it's best not to call this and allow the os/vshell to handle it instead to avoid brief noise // in the video display. Should we not do this then? // // bugbug jmccaskey - don't do this? if ( m_pPSGLDevice ) { psglMakeCurrent( NULL, m_pPSGLDevice ); if ( m_pPSGLContext ) { psglDestroyContext( m_pPSGLContext ); m_pPSGLContext = NULL; } psglDestroyDevice( m_pPSGLDevice ); m_pPSGLDevice = NULL; } psglExit(); */ }
static void ps3_joypad_destroy(void) { cellPadEnd(); }
int main(int argc, char *argv[]) { int ret; #if defined(_XBOX) XINPUT_STATE state; get_environment_settings(); XInputGetState(0, &state); if(state.Gamepad.wButtons & XINPUT_GAMEPAD_Y) { //override path, boot first executable in cores directory RARCH_LOG("Fallback - Will boot first executable in RetroArch cores directory.\n"); find_and_set_first_file(); } else { //normal executable loading path init_settings(); } XLaunchNewImage(libretro_path, NULL); RARCH_LOG("Launch libretro core: [%s] (return code: %x]).\n", libretro_path, ret); #elif defined(__CELLOS_LV2__) CellPadData pad_data; char spawn_data[256], spawn_data_size[16]; SceNpDrmKey * k_licensee = NULL; cellSysutilRegisterCallback(0, callback_sysutil_exit, NULL); cellSysmoduleLoadModule(CELL_SYSMODULE_IO); cellSysmoduleLoadModule(CELL_SYSMODULE_FS); cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_GAME); cellSysmoduleLoadModule(CELL_SYSMODULE_NET); cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_NP); sys_net_initialize_network(); #ifdef HAVE_LOGGER logger_init(); #endif sceNpInit(NP_POOL_SIZE, np_pool); get_environment_settings(); cellPadInit(7); cellPadGetData(0, &pad_data); if(pad_data.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_TRIANGLE) { //override path, boot first executable in cores directory RARCH_LOG("Fallback - Will boot first executable in RetroArch cores/ directory.\n"); find_and_set_first_file(); } else { //normal executable loading path init_settings(); } cellPadEnd(); #ifdef HAVE_LOGGER logger_shutdown(); #endif for(unsigned int i = 0; i < sizeof(spawn_data); ++i) spawn_data[i] = i & 0xff; snprintf(spawn_data_size, sizeof(spawn_data_size), "%d", 256); const char * const spawn_argv[] = { spawn_data_size, "test argv for", "sceNpDrmProcessExitSpawn2()", NULL }; ret = sceNpDrmProcessExitSpawn2(k_licensee, libretro_path, (const char** const)spawn_argv, NULL, (sys_addr_t)spawn_data, 256, 1000, SYS_PROCESS_PRIMARY_STACK_SIZE_1M); RARCH_LOG("Launch libretro core: [%s] (return code: %x]).\n", libretro_path, ret); if(ret < 0) { RARCH_LOG("Executable file is not of NPDRM type, trying another approach to boot it...\n"); sys_game_process_exitspawn2(libretro_path, NULL, NULL, NULL, 0, 1000, SYS_PROCESS_PRIMARY_STACK_SIZE_1M); } sceNpTerm(); sys_net_finalize_network(); cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_NP); cellSysmoduleUnloadModule(CELL_SYSMODULE_NET); cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_GAME); cellSysmoduleLoadModule(CELL_SYSMODULE_FS); cellSysmoduleLoadModule(CELL_SYSMODULE_IO); #endif return 1; }
//----------------------------------------------------------------------------- // Description: Platform specific input shutdown // Parameters: // Returns: // Notes: //----------------------------------------------------------------------------- void FWInput::platformShutdown() { cellPadEnd(); cellKbEnd(); cellMouseEnd(); }