mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Cleanups
This commit is contained in:
parent
1f2bd96459
commit
07eddd7229
@ -562,7 +562,6 @@ static int16_t dinput_input_state(
|
||||
unsigned id)
|
||||
{
|
||||
settings_t *settings;
|
||||
int16_t ret = 0;
|
||||
struct dinput_input *di = (struct dinput_input*)data;
|
||||
|
||||
if (port < MAX_USERS)
|
||||
@ -571,7 +570,8 @@ static int16_t dinput_input_state(
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
{
|
||||
settings = config_get_ptr();
|
||||
int16_t ret = 0;
|
||||
settings = config_get_ptr();
|
||||
|
||||
if (id == RETRO_DEVICE_ID_JOYPAD_MASK)
|
||||
{
|
||||
@ -633,6 +633,7 @@ static int16_t dinput_input_state(
|
||||
di->state[rarch_keysym_lut[(enum retro_key)id]] & 0x80;
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
{
|
||||
int16_t ret = 0;
|
||||
int id_minus_key = 0;
|
||||
int id_plus_key = 0;
|
||||
unsigned id_minus = 0;
|
||||
@ -659,8 +660,9 @@ static int16_t dinput_input_state(
|
||||
if (di->state[sym] & 0x80)
|
||||
ret += -0x7fff;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
break;
|
||||
case RARCH_DEVICE_MOUSE_SCREEN:
|
||||
settings = config_get_ptr();
|
||||
if (settings->uints.input_mouse_index[ port ] != 0)
|
||||
@ -680,8 +682,6 @@ static int16_t dinput_input_state(
|
||||
settings = config_get_ptr();
|
||||
if (settings->uints.input_mouse_index[port] == 0)
|
||||
{
|
||||
int16_t state = 0;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_MOUSE_X:
|
||||
@ -694,24 +694,36 @@ static int16_t dinput_input_state(
|
||||
return (di->flags & DINP_FLAG_MOUSE_R_BTN);
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||
if (di->flags & DINP_FLAG_MOUSE_WU_BTN)
|
||||
state = 1;
|
||||
{
|
||||
di->flags &= ~DINP_FLAG_MOUSE_WU_BTN;
|
||||
return 1;
|
||||
}
|
||||
di->flags &= ~DINP_FLAG_MOUSE_WU_BTN;
|
||||
return state;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||
if (di->flags & DINP_FLAG_MOUSE_WD_BTN)
|
||||
state = 1;
|
||||
{
|
||||
di->flags &= ~DINP_FLAG_MOUSE_WD_BTN;
|
||||
return 1;
|
||||
}
|
||||
di->flags &= ~DINP_FLAG_MOUSE_WD_BTN;
|
||||
return state;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
if (di->flags & DINP_FLAG_MOUSE_HWU_BTN)
|
||||
state = 1;
|
||||
{
|
||||
di->flags &= ~DINP_FLAG_MOUSE_HWU_BTN;
|
||||
return 1;
|
||||
}
|
||||
di->flags &= ~DINP_FLAG_MOUSE_HWU_BTN;
|
||||
return state;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
if (di->flags & DINP_FLAG_MOUSE_HWD_BTN)
|
||||
state = 1;
|
||||
{
|
||||
di->flags &= ~DINP_FLAG_MOUSE_HWD_BTN;
|
||||
return 1;
|
||||
}
|
||||
di->flags &= ~DINP_FLAG_MOUSE_HWD_BTN;
|
||||
return state;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
||||
return (di->flags & DINP_FLAG_MOUSE_M_BTN);
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_4:
|
||||
@ -778,7 +790,7 @@ static int16_t dinput_input_state(
|
||||
case RETRO_DEVICE_ID_POINTER_Y:
|
||||
return res_y;
|
||||
case RETRO_DEVICE_ID_POINTER_PRESSED:
|
||||
return check_pos ? true : (di->flags & DINP_FLAG_MOUSE_L_BTN);
|
||||
return check_pos ? 1 : (di->flags & DINP_FLAG_MOUSE_L_BTN);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1004,17 +1016,10 @@ bool dinput_handle_message(void *data,
|
||||
wParam == DBT_DEVICEREMOVECOMPLETE)
|
||||
{
|
||||
PDEV_BROADCAST_HDR pHdr = (PDEV_BROADCAST_HDR)lParam;
|
||||
/* TODO/FIXME: Don't destroy everything, let's just
|
||||
* handle new devices gracefully */
|
||||
if (pHdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE)
|
||||
{
|
||||
#if 0
|
||||
PDEV_BROADCAST_DEVICEINTERFACE pDevInf =
|
||||
(PDEV_BROADCAST_DEVICEINTERFACE)pHdr;
|
||||
#endif
|
||||
|
||||
/* TODO/FIXME: Don't destroy everything, let's just
|
||||
* handle new devices gracefully */
|
||||
joypad_driver_reinit(di, di->joypad_drv_name);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
@ -2255,9 +2255,6 @@ static int menu_cbs_init_bind_get_string_representation_compare_type(
|
||||
BIND_ACTION_GET_VALUE(cbs, menu_action_setting_disp_set_label_entry);
|
||||
break;
|
||||
default:
|
||||
#if 0
|
||||
RARCH_LOG("type: %d\n", type);
|
||||
#endif
|
||||
BIND_ACTION_GET_VALUE(cbs, menu_action_setting_disp_set_label);
|
||||
break;
|
||||
}
|
||||
|
@ -1771,13 +1771,7 @@ static bool menu_content_find_first_core(menu_content_ctx_defer_info_t *def_info
|
||||
{
|
||||
core_info_get_current_core((core_info_t**)&info);
|
||||
if (info)
|
||||
{
|
||||
#if 0
|
||||
RARCH_LOG("[lobby] use the current core (%s) to load this content...\n",
|
||||
info->path);
|
||||
#endif
|
||||
supported = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* There are multiple deferred cores and a
|
||||
@ -4661,38 +4655,6 @@ static void cb_net_generic_subdir(retro_task_t *task,
|
||||
void *task_data, void *user_data, const char *err)
|
||||
{
|
||||
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
|
||||
#if 0
|
||||
char subdir_path[PATH_MAX_LENGTH];
|
||||
file_transfer_t *state = (file_transfer_t*)user_data;
|
||||
subdir_path[0] = '\0';
|
||||
#endif
|
||||
|
||||
if (!data || err)
|
||||
goto finish;
|
||||
|
||||
#if 0
|
||||
if (!string_is_empty(data->data))
|
||||
memcpy(subdir_path, data->data, data->len * sizeof(char));
|
||||
subdir_path[data->len] = '\0';
|
||||
#endif
|
||||
|
||||
finish:
|
||||
/* TODO/FIXME - unimplemented/unfinished code */
|
||||
#if 0
|
||||
if (!err && !string_ends_with_size(subdir_path,
|
||||
FILE_PATH_INDEX_DIRS_URL,
|
||||
strlen(subdir_path),
|
||||
STRLEN_CONST(FILE_PATH_INDEX_DIRS_URL)
|
||||
))
|
||||
{
|
||||
char parent_dir[PATH_MAX_LENGTH];
|
||||
fill_pathname_parent_dir(parent_dir,
|
||||
state->path, sizeof(parent_dir));
|
||||
/*generic_action_ok_displaylist_push(parent_dir, NULL,
|
||||
subdir_path, 0, 0, 0, ACTION_OK_DL_CORE_CONTENT_DIRS_SUBDIR_LIST);*/
|
||||
}
|
||||
#endif
|
||||
|
||||
if (user_data)
|
||||
free(user_data);
|
||||
}
|
||||
@ -6491,14 +6453,6 @@ static int action_ok_push_dropdown_setting(const char *path,
|
||||
static int action_ok_push_dropdown_item(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
#if 0
|
||||
RARCH_LOG("dropdown: \n");
|
||||
RARCH_LOG("path: %s \n", path);
|
||||
RARCH_LOG("label: %s \n", label);
|
||||
RARCH_LOG("type: %d \n", type);
|
||||
RARCH_LOG("idx: %d \n", idx);
|
||||
RARCH_LOG("entry_idx: %d \n", entry_idx);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -452,12 +452,6 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_netplay_game_watch, ME
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_netplay_player_chat, MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_PLAYER_CHAT)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_netplay_fade_chat_toggle, MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_FADE_CHAT_TOGGLE)
|
||||
|
||||
#if 0
|
||||
/* Hidden in displaylist */
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_osk, MENU_ENUM_SUBLABEL_INPUT_META_OSK)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_overlay_next, MENU_ENUM_SUBLABEL_INPUT_META_OVERLAY_NEXT)
|
||||
#endif
|
||||
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_hotkey_block_delay, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_device_type, MENU_ENUM_SUBLABEL_INPUT_DEVICE_TYPE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_adc_type, MENU_ENUM_SUBLABEL_INPUT_ADC_TYPE)
|
||||
@ -2314,17 +2308,6 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case RARCH_NETPLAY_FADE_CHAT_TOGGLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_meta_netplay_fade_chat_toggle);
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
/* Hidden in displaylist */
|
||||
case RARCH_OSK:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_meta_osk);
|
||||
return 0;
|
||||
case RARCH_OVERLAY_NEXT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_meta_overlay_next);
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3979,32 +3979,9 @@ static int xmb_draw_item(
|
||||
xmb->entry_idx_enabled &&
|
||||
!string_is_empty(xmb->entry_index_str))
|
||||
{
|
||||
float entry_idx_margin = 12 * xmb->last_scale_factor;
|
||||
|
||||
#if 0
|
||||
/* Disabled due to overlap with arrow image
|
||||
* and previous selection icon when enough items */
|
||||
|
||||
/* Calculate position depending on the current
|
||||
* list and if Thumbnail Vertical Disposition
|
||||
* is enabled (branchless version) */
|
||||
float x_position = (
|
||||
video_width - entry_idx_margin) *
|
||||
!menu_xmb_vertical_thumbnails +
|
||||
(node->x + xmb->margins_screen_left +
|
||||
xmb->icon_spacing_horizontal -
|
||||
xmb->margins_label_left) *
|
||||
menu_xmb_vertical_thumbnails;
|
||||
float y_position = (
|
||||
video_height - entry_idx_margin) *
|
||||
!menu_xmb_vertical_thumbnails +
|
||||
(xmb->margins_screen_top + xmb->margins_label_top +
|
||||
xmb->icon_spacing_vertical * xmb->active_item_factor) *
|
||||
menu_xmb_vertical_thumbnails;
|
||||
#else
|
||||
float entry_idx_margin = 12 * xmb->last_scale_factor;
|
||||
float x_position = video_width - entry_idx_margin;
|
||||
float y_position = video_height - entry_idx_margin;
|
||||
#endif
|
||||
|
||||
xmb_draw_text(xmb_shadows_enable, xmb, settings,
|
||||
xmb->entry_index_str, x_position, y_position,
|
||||
@ -5734,26 +5711,11 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
/* Configure shadow effect */
|
||||
if (xmb_shadows_enable)
|
||||
{
|
||||
#if 0
|
||||
/* Drop shadow for thumbnails needs to be larger
|
||||
* than for text/icons, and also needs to scale
|
||||
* with screen dimensions */
|
||||
float shadow_offset = xmb->shadow_offset * 1.5f
|
||||
* xmb->last_scale_factor;
|
||||
if (shadow_offset <= xmb->shadow_offset)
|
||||
shadow_offset = xmb->shadow_offset;
|
||||
|
||||
thumbnail_shadow.type = GFX_THUMBNAIL_SHADOW_DROP;
|
||||
thumbnail_shadow.alpha = GFX_SHADOW_ALPHA;
|
||||
thumbnail_shadow.drop.x_offset = shadow_offset;
|
||||
thumbnail_shadow.drop.y_offset = shadow_offset;
|
||||
#else
|
||||
thumbnail_shadow.type = GFX_THUMBNAIL_SHADOW_OUTLINE;
|
||||
thumbnail_shadow.alpha = 0.50f;
|
||||
thumbnail_shadow.outline.width = 2 * xmb->last_scale_factor;
|
||||
if (thumbnail_shadow.outline.width < 1)
|
||||
thumbnail_shadow.outline.width = 1;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
thumbnail_shadow.type = GFX_THUMBNAIL_SHADOW_NONE;
|
||||
|
@ -2385,18 +2385,6 @@ static bool menu_driver_displaylist_push_internal(
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
#if 0
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
menu_entries_append(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_TAKE_SCREENSHOT),
|
||||
MENU_ENUM_LABEL_TAKE_SCREENSHOT,
|
||||
MENU_SETTING_ACTION_SCREENSHOT, 0, 0, NULL);
|
||||
else
|
||||
info->flags |= MD_FLAG_NEED_PUSH_NO_PLAYLIST_ENTRIES;
|
||||
#endif
|
||||
#endif
|
||||
menu_displaylist_ctl(DISPLAYLIST_IMAGES_HISTORY, info, settings);
|
||||
return true;
|
||||
}
|
||||
@ -3591,14 +3579,6 @@ bool rarch_menu_init(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* TODO: No reason to do this here since shaders need
|
||||
* content, and this is called in content_load() */
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
menu_shader_manager_init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
11
retroarch.c
11
retroarch.c
@ -6407,17 +6407,6 @@ error:
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static bool retroarch_is_on_main_thread(shtread_tls_t *tls)
|
||||
{
|
||||
#ifdef HAVE_THREAD_STORAGE
|
||||
return sthread_tls_get(tls) == MAGIC_POINTER;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void retroarch_init_task_queue(void)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
|
@ -754,19 +754,7 @@ static int database_info_list_iterate_found_match(
|
||||
(hash = strchr(entry_path_str, '#')))
|
||||
*hash = '\0';
|
||||
|
||||
#if defined(RARCH_INTERNAL)
|
||||
#if 0
|
||||
RARCH_LOG("Found match in database !\n");
|
||||
|
||||
RARCH_LOG("Path: %s\n", db_path);
|
||||
RARCH_LOG("CRC : %s\n", db_crc);
|
||||
RARCH_LOG("Playlist Path: %s\n", db_playlist_path);
|
||||
RARCH_LOG("Entry Path: %s\n", entry_path);
|
||||
RARCH_LOG("Playlist not NULL: %d\n", playlist != NULL);
|
||||
RARCH_LOG("ZIP entry: %s\n", archive_name);
|
||||
RARCH_LOG("entry path str: %s\n", entry_path_str);
|
||||
#endif
|
||||
#else
|
||||
#if !defined(RARCH_INTERNAL)
|
||||
fprintf(stderr, "Found match in database !\n");
|
||||
|
||||
fprintf(stderr, "Path: %s\n", db_path);
|
||||
@ -915,10 +903,6 @@ static int task_database_iterate_crc_lookup(
|
||||
|
||||
if (db_info_entry && db_info_entry->crc32)
|
||||
{
|
||||
#if 0
|
||||
RARCH_LOG("CRC32: 0x%08X , entry CRC32: 0x%08X (%s).\n",
|
||||
db_state->crc, db_info_entry->crc32, db_info_entry->name);
|
||||
#endif
|
||||
if (db_state->archive_crc == db_info_entry->crc32)
|
||||
return database_info_list_iterate_found_match(
|
||||
_db,
|
||||
@ -1051,11 +1035,6 @@ static int task_database_iterate_serial_lookup(
|
||||
|
||||
if (db_info_entry && db_info_entry->serial)
|
||||
{
|
||||
#if 0
|
||||
RARCH_LOG("serial: %s , entry serial: %s (%s).\n",
|
||||
db_state->serial, db_info_entry->serial,
|
||||
db_info_entry->name);
|
||||
#endif
|
||||
if (string_is_equal(db_state->serial, db_info_entry->serial))
|
||||
return database_info_list_iterate_found_match(_db,
|
||||
db_state, db, NULL);
|
||||
|
@ -84,16 +84,16 @@ static bool bsv_movie_init_playback(
|
||||
RARCH_ERR("%s\n", msg_hash_to_str(MSG_MOVIE_FILE_IS_NOT_A_VALID_REPLAY_FILE));
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
#if 0
|
||||
if (swap_if_big32(header[VERSION_INDEX]) > REPLAY_FORMAT_VERSION)
|
||||
{
|
||||
RARCH_ERR("%s\n", msg_hash_to_str(MSG_MOVIE_FILE_IS_NOT_A_VALID_REPLAY_FILE));
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
state_size = swap_if_big32(header[STATE_SIZE_INDEX]);
|
||||
identifier_loc = (int64_t *)(header+IDENTIFIER_INDEX);
|
||||
state_size = swap_if_big32(header[STATE_SIZE_INDEX]);
|
||||
identifier_loc = (int64_t *)(header+IDENTIFIER_INDEX);
|
||||
handle->identifier = swap_if_big64(*identifier_loc);
|
||||
|
||||
#if 0
|
||||
|
@ -592,9 +592,7 @@ static void task_overlay_deferred_loading(retro_task_t *task)
|
||||
case OVERLAY_IMAGE_TRANSFER_NONE:
|
||||
case OVERLAY_IMAGE_TRANSFER_BUSY:
|
||||
loader->loading_status = OVERLAY_IMAGE_TRANSFER_DONE;
|
||||
#if 0
|
||||
break;
|
||||
#endif
|
||||
/* fall-through */
|
||||
case OVERLAY_IMAGE_TRANSFER_DONE:
|
||||
task_overlay_image_done(&loader->overlays[loader->pos]);
|
||||
loader->loading_status = OVERLAY_IMAGE_TRANSFER_DESC_IMAGE_ITERATE;
|
||||
|
@ -4005,22 +4005,11 @@ static void* ui_window_qt_init(void)
|
||||
static void ui_window_qt_destroy(void *data)
|
||||
{
|
||||
/* TODO/FIXME - implement? */
|
||||
#if 0
|
||||
ui_window_qt_t *window = (ui_window_qt_t*)data;
|
||||
|
||||
delete window->qtWindow;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ui_window_qt_set_focused(void *data)
|
||||
{
|
||||
/* TODO/FIXME - implement */
|
||||
#if 0
|
||||
ui_window_qt_t *window = (ui_window_qt_t*)data;
|
||||
|
||||
window->qtWindow->raise();
|
||||
window->qtWindow->activateWindow();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ui_window_qt_set_visible(void *data,
|
||||
@ -4032,32 +4021,17 @@ static void ui_window_qt_set_visible(void *data,
|
||||
static void ui_window_qt_set_title(void *data, char *buf)
|
||||
{
|
||||
/* TODO/FIXME - implement? */
|
||||
#if 0
|
||||
ui_window_qt_t *window = (ui_window_qt_t*)data;
|
||||
|
||||
window->qtWindow->setWindowTitle(QString::fromUtf8(buf));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void ui_window_qt_set_droppable(void *data, bool droppable)
|
||||
{
|
||||
/* TODO/FIXME - implement */
|
||||
#if 0
|
||||
ui_window_qt_t *window = (ui_window_qt_t*)data;
|
||||
|
||||
window->qtWindow->setAcceptDrops(droppable);
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool ui_window_qt_focused(void *data)
|
||||
{
|
||||
/* TODO/FIXME - implement? */
|
||||
#if 0
|
||||
ui_window_qt_t *window = (ui_window_qt_t*)data;
|
||||
return window->qtWindow->isActiveWindow() && !window->qtWindow->isMinimized();
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ui_window_t ui_window_qt = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user