mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
(PS3) Some more work on menu
This commit is contained in:
parent
c6fc8e45ff
commit
59aeb77744
@ -43,7 +43,7 @@ INCDIRS = -I. -Icommon
|
||||
MAKE_FSELF_NPDRM = $(CELL_SDK)/$(HOST_DIR)/bin/make_fself_npdrm
|
||||
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/$(HOST_DIR)/bin/make_package_npdrm
|
||||
|
||||
OBJ = fifo_buffer.o ps3/cellframework2/fileio/file_browser.o ps3/ps3_audio.o ps3/ps3_input.o ps3/pad_input.o getopt.o ssnes.o driver.o file.o settings.o message.o rewind.o movie.o gfx/gfx_common.o ps3/ps3_video_psgl.o gfx/shader_cg.o gfx/snes_state.o ups.o bps.o strl.o screenshot.o audio/hermite.o dynamic.o ps3/main.o audio/utils.o conf/config_file.o gfx/image.o
|
||||
OBJ = fifo_buffer.o ps3/cellframework2/fileio/file_browser.o ps3/ps3_audio.o ps3/menu.o ps3/ps3_input.o ps3/cellframework2/input/pad_input.o getopt.o ssnes.o driver.o file.o settings.o message.o rewind.o movie.o gfx/gfx_common.o ps3/ps3_video_psgl.o gfx/shader_cg.o gfx/snes_state.o ups.o bps.o strl.o screenshot.o audio/hermite.o dynamic.o ps3/main.o audio/utils.o conf/config_file.o gfx/image.o
|
||||
|
||||
LIBS = -ldbgfont -lPSGL -lPSGLcgc -lcgc -lgcm_cmd -lgcm_sys_stub -lsnes -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysmodule_stub -laudio_stub -lnet_stub -lpthread
|
||||
|
||||
@ -52,7 +52,7 @@ DEFINES = -DHAVE_OPENGL=1 -DHAVE_CG=1 -DHAVE_FBO=1 -D__CELLOS_LV2__ -DHAVE_CONFI
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O3
|
||||
PPU_OPTIMIZE_LV := -O3 -g
|
||||
endif
|
||||
|
||||
## Use this for new SDK!
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include "../conf/config_file.h"
|
||||
#include "../general.h"
|
||||
#include "menu.h"
|
||||
|
||||
#define MAX_PATH_LENGTH 1024
|
||||
|
||||
@ -223,6 +224,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
get_path_settings(return_to_MM);
|
||||
|
||||
ps3_input_init();
|
||||
|
||||
menu_init();
|
||||
//menu_loop();
|
||||
|
||||
/* FIXME - As long as we don't use a menu */
|
||||
snprintf(g_extern.system.fullpath, sizeof(g_extern.system.fullpath), "/dev_hdd0/game/SNES90000/USRDIR/main.sfc");
|
||||
|
||||
@ -237,4 +243,6 @@ int main(int argc, char *argv[])
|
||||
snprintf(arg5, sizeof(arg5), SYS_CONFIG_FILE);
|
||||
char *argv_[] = { arg1, arg2, arg3, arg4, arg5, NULL };
|
||||
return ssnes_main(sizeof(argv_) / sizeof(argv_[0]) - 1, argv_);
|
||||
|
||||
ps3_input_deinit();
|
||||
}
|
||||
|
@ -19,9 +19,11 @@
|
||||
#include <sysutil/sysutil_screenshot.h>
|
||||
#include <cell/dbgfont.h>
|
||||
|
||||
//#include "cellframework2/input/pad_input.h"
|
||||
#include "cellframework2/input/pad_input.h"
|
||||
#include "cellframework2/fileio/file_browser.h"
|
||||
|
||||
#include "ps3_video_psgl.h"
|
||||
|
||||
#include "shared.h"
|
||||
#include "../general.h"
|
||||
|
||||
@ -988,7 +990,8 @@ void menu_loop(void)
|
||||
do
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
ps3graphics_draw_menu();
|
||||
//ps3graphics_draw_menu();
|
||||
g_frame_count++;
|
||||
|
||||
switch(menuStack[menuStackindex].enum_id)
|
||||
{
|
||||
|
@ -16,9 +16,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "../driver.h"
|
||||
#include "pad_input.h"
|
||||
#include "ps3_input.h"
|
||||
#include <stdint.h>
|
||||
#include "../libsnes.hpp"
|
||||
|
||||
@ -102,10 +101,19 @@ static void ps3_free_input(void *data)
|
||||
cell_pad_input_deinit();
|
||||
}
|
||||
|
||||
static void* ps3_input_init(void)
|
||||
static void* ps3_input_initialize(void)
|
||||
{
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
void ps3_input_init(void)
|
||||
{
|
||||
cell_pad_input_init();
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
void ps3_input_deinit(void)
|
||||
{
|
||||
cell_pad_input_deinit();
|
||||
}
|
||||
|
||||
static bool ps3_key_pressed(void *data, int key)
|
||||
@ -131,7 +139,7 @@ static bool ps3_key_pressed(void *data, int key)
|
||||
}
|
||||
|
||||
const input_driver_t input_ps3 = {
|
||||
.init = ps3_input_init,
|
||||
.init = ps3_input_initialize,
|
||||
.poll = ps3_input_poll,
|
||||
.input_state = ps3_input_state,
|
||||
.key_pressed = ps3_key_pressed,
|
||||
|
27
ps3/ps3_input.h
Normal file
27
ps3/ps3_input.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* SSNES - A Super Ninteno Entertainment System (SNES) Emulator frontend for libsnes.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||
*
|
||||
* Some code herein may be based on code found in BSNES.
|
||||
*
|
||||
* SSNES is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with SSNES.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _PS3_INPUT_H_
|
||||
#define _PS3_INPUT_H_
|
||||
|
||||
#include "cellframework2/input/pad_input.h"
|
||||
|
||||
void ps3_input_init(void);
|
||||
void ps3_input_deinit(void);
|
||||
|
||||
#endif
|
@ -19,20 +19,16 @@
|
||||
|
||||
#include "../driver.h"
|
||||
|
||||
#include "ps3_video_psgl.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../libsnes.hpp"
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
#include <string.h>
|
||||
#include "../general.h"
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <PSGL/psgl.h>
|
||||
#include <PSGL/psglu.h>
|
||||
#include <GLES/glext.h>
|
||||
#include <cell/dbgfont.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
27
ps3/ps3_video_psgl.h
Normal file
27
ps3/ps3_video_psgl.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||
*
|
||||
* Some code herein may be based on code found in BSNES.
|
||||
*
|
||||
* SSNES is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with SSNES.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _PS3_VIDEO_PSGL_H
|
||||
#define _PS3_VIDEO_PSGL_H
|
||||
|
||||
#include <PSGL/psgl.h>
|
||||
#include <PSGL/psglu.h>
|
||||
#include <GLES/glext.h>
|
||||
#include <cell/dbgfont.h>
|
||||
|
||||
#endif
|
@ -241,32 +241,9 @@ static void producesettingentry(uint64_t switchvalue)
|
||||
case SETTING_ENABLE_SCREENSHOTS:
|
||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
|
||||
{
|
||||
#if(CELL_SDK_VERSION > 0x340000)
|
||||
Settings.ScreenshotsEnabled = !Settings.ScreenshotsEnabled;
|
||||
if(Settings.ScreenshotsEnabled)
|
||||
{
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT);
|
||||
CellScreenShotSetParam screenshot_param = {0, 0, 0, 0};
|
||||
|
||||
screenshot_param.photo_title = EMULATOR_NAME;
|
||||
screenshot_param.game_title = EMULATOR_NAME;
|
||||
cellScreenShotSetParameter (&screenshot_param);
|
||||
cellScreenShotEnable();
|
||||
}
|
||||
else
|
||||
{
|
||||
cellScreenShotDisable();
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_SCREENSHOT);
|
||||
}
|
||||
|
||||
set_text_message("", 7);
|
||||
#endif
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
#if(CELL_SDK_VERSION > 0x340000)
|
||||
Settings.ScreenshotsEnabled = false;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case SETTING_SAVE_SHADER_PRESET:
|
||||
|
Loading…
Reference in New Issue
Block a user