mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Merge branch 'master' of https://github.com/libretro/RetroArch
This commit is contained in:
commit
1ea3252602
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@ -7,6 +7,7 @@
|
||||
"terminal.integrated.cursorBlinking": true,
|
||||
|
||||
"editor.tabSize": 3,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": true,
|
||||
"files.associations": {
|
||||
@ -26,7 +27,13 @@
|
||||
"menu_driver.h": "c",
|
||||
"file_path.h": "c",
|
||||
"unordered_map": "c",
|
||||
"unordered_set": "c"
|
||||
"unordered_set": "c",
|
||||
"sstream": "cpp",
|
||||
"hash_map": "c",
|
||||
"hash_set": "c",
|
||||
"initializer_list": "c",
|
||||
"string_view": "c",
|
||||
"utility": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
57
.vscode/tasks.json
vendored
57
.vscode/tasks.json
vendored
@ -4,12 +4,49 @@
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "msys2-mingw64 build",
|
||||
"label": "linux clean build",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make clean && ./configure && make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux clean",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make clean"
|
||||
},
|
||||
{
|
||||
"label": "linux build with debug symbols",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "DEBUG=1 make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux build",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux build and run",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make -j12 && ./retroarch -v"
|
||||
},
|
||||
{
|
||||
"label": "linux build and run with debug symbols",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "DEBUG=1 make -j12 && ./retroarch -v"
|
||||
},
|
||||
{
|
||||
"label": "msys2-mingw64 build",
|
||||
"type": "shell",
|
||||
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true },
|
||||
"isDefault": true
|
||||
},
|
||||
|
||||
"command": "./configure; make -j2",
|
||||
"options": {
|
||||
@ -20,9 +57,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 build with debug symbols",
|
||||
"label": "msys2-mingw64 build with debug symbols",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
@ -36,9 +73,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 rebuild",
|
||||
"label": "msys2-mingw64 rebuild",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
@ -52,9 +89,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 clean",
|
||||
"label": "msys2-mingw64 clean",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
@ -68,9 +105,9 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskName": "msys2-mingw64 run",
|
||||
"label": "msys2-mingw64 run",
|
||||
"type": "shell",
|
||||
|
||||
"group": {
|
||||
|
@ -478,6 +478,11 @@ static const float crt_refresh_rate = 60/1.001;
|
||||
* Used for setups where one manually rotates the monitor. */
|
||||
static const bool allow_rotate = true;
|
||||
|
||||
#ifdef _3DS
|
||||
/* Enable bottom LCD screen */
|
||||
static const bool video_3ds_lcd_bottom = true;
|
||||
#endif
|
||||
|
||||
/* AUDIO */
|
||||
|
||||
/* Will enable audio or not. */
|
||||
|
@ -1517,6 +1517,10 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
|
||||
SETTING_BOOL("sustained_performance_mode", &settings->bools.sustained_performance_mode, true, sustained_performance_mode, false);
|
||||
|
||||
#ifdef _3DS
|
||||
SETTING_BOOL("video_3ds_lcd_bottom", &settings->bools.video_3ds_lcd_bottom, true, video_3ds_lcd_bottom, false);
|
||||
#endif
|
||||
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
|
@ -104,6 +104,7 @@ typedef struct settings
|
||||
bool video_statistics_show;
|
||||
bool video_framecount_show;
|
||||
bool video_msg_bgcolor_enable;
|
||||
bool video_3ds_lcd_bottom;
|
||||
|
||||
/* Audio */
|
||||
bool audio_enable;
|
||||
|
@ -47,6 +47,12 @@
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#endif
|
||||
|
||||
/* An annoyance...
|
||||
* Have to keep track of bottom screen enable state
|
||||
* externally, otherwise cannot detect current state
|
||||
* when reinitialising... */
|
||||
static bool ctr_bottom_screen_enabled = true;
|
||||
|
||||
static INLINE void ctr_check_3D_slider(ctr_video_t* ctr)
|
||||
{
|
||||
float slider_val = *(float*)0x1FF81080;
|
||||
@ -263,7 +269,7 @@ static void ctr_lcd_aptHook(APT_HookType hook, void* param)
|
||||
if(not_2DS && srvGetServiceHandle(&lcd_handle, "gsp::Lcd") >= 0)
|
||||
{
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
cmdbuf[0] = ((hook == APTHOOK_ONSUSPEND) || ctr->lcd_buttom_on)? 0x00110040: 0x00120040;
|
||||
cmdbuf[0] = ((hook == APTHOOK_ONSUSPEND) || ctr_bottom_screen_enabled)? 0x00110040: 0x00120040;
|
||||
cmdbuf[1] = 2;
|
||||
svcSendSyncRequest(lcd_handle);
|
||||
svcCloseHandle(lcd_handle);
|
||||
@ -283,11 +289,38 @@ static bool ctr_tasks_finder(retro_task_t *task,void *userdata)
|
||||
task_finder_data_t ctr_tasks_finder_data = {ctr_tasks_finder, NULL};
|
||||
#endif
|
||||
|
||||
static void ctr_set_bottom_screen_enable(void* data, bool enabled)
|
||||
{
|
||||
Handle lcd_handle;
|
||||
u8 not_2DS;
|
||||
extern PrintConsole* currentConsole;
|
||||
ctr_video_t *ctr = (ctr_video_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return;
|
||||
|
||||
gfxBottomFramebuffers[0] = enabled ? (u8*)currentConsole->frameBuffer:
|
||||
(u8*)ctr->empty_framebuffer;
|
||||
|
||||
CFGU_GetModelNintendo2DS(¬_2DS);
|
||||
if(not_2DS && srvGetServiceHandle(&lcd_handle, "gsp::Lcd") >= 0)
|
||||
{
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
cmdbuf[0] = enabled? 0x00110040: 0x00120040;
|
||||
cmdbuf[1] = 2;
|
||||
svcSendSyncRequest(lcd_handle);
|
||||
svcCloseHandle(lcd_handle);
|
||||
}
|
||||
|
||||
ctr_bottom_screen_enabled = enabled;
|
||||
}
|
||||
|
||||
static void* ctr_init(const video_info_t* video,
|
||||
const input_driver_t** input, void** input_data)
|
||||
{
|
||||
float refresh_rate;
|
||||
void* ctrinput = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
ctr_video_t* ctr = (ctr_video_t*)linearAlloc(sizeof(ctr_video_t));
|
||||
|
||||
if (!ctr)
|
||||
@ -415,7 +448,6 @@ static void* ctr_init(const video_info_t* video,
|
||||
|
||||
if (input && input_data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
ctrinput = input_ctr.init(settings->arrays.input_joypad_driver);
|
||||
*input = ctrinput ? &input_ctr : NULL;
|
||||
*input_data = ctrinput;
|
||||
@ -425,7 +457,7 @@ static void* ctr_init(const video_info_t* video,
|
||||
ctr->should_resize = true;
|
||||
ctr->smooth = video->smooth;
|
||||
ctr->vsync = video->vsync;
|
||||
ctr->lcd_buttom_on = true;
|
||||
ctr->lcd_buttom_on = true; /* Unused */
|
||||
ctr->current_buffer_top = 0;
|
||||
|
||||
ctr->empty_framebuffer = linearAlloc(320 * 240 * 2);
|
||||
@ -444,6 +476,11 @@ static void* ctr_init(const video_info_t* video,
|
||||
ctr->menu_texture_frame_enable = false;
|
||||
ctr->menu_texture_enable = false;
|
||||
|
||||
/* Set bottom screen enable state, if required */
|
||||
if (settings->bools.video_3ds_lcd_bottom != ctr_bottom_screen_enabled) {
|
||||
ctr_set_bottom_screen_enable(ctr, settings->bools.video_3ds_lcd_bottom);
|
||||
}
|
||||
|
||||
gspSetEventCallback(GSPGPU_EVENT_VBlank0, (ThreadFunc)ctr_vsync_hook, ctr, false);
|
||||
|
||||
return ctr;
|
||||
@ -494,24 +531,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
hidTouchRead(&state_tmp_touch);
|
||||
if((state_tmp & KEY_TOUCH) && (state_tmp_touch.py < 120))
|
||||
{
|
||||
Handle lcd_handle;
|
||||
u8 not_2DS;
|
||||
extern PrintConsole* currentConsole;
|
||||
|
||||
gfxBottomFramebuffers[0] = ctr->lcd_buttom_on ? (u8*)ctr->empty_framebuffer:
|
||||
(u8*)currentConsole->frameBuffer;
|
||||
|
||||
CFGU_GetModelNintendo2DS(¬_2DS);
|
||||
if(not_2DS && srvGetServiceHandle(&lcd_handle, "gsp::Lcd") >= 0)
|
||||
{
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
cmdbuf[0] = ctr->lcd_buttom_on? 0x00120040: 0x00110040;
|
||||
cmdbuf[1] = 2;
|
||||
svcSendSyncRequest(lcd_handle);
|
||||
svcCloseHandle(lcd_handle);
|
||||
}
|
||||
|
||||
ctr->lcd_buttom_on = !ctr->lcd_buttom_on;
|
||||
ctr_set_bottom_screen_enable(ctr, !ctr_bottom_screen_enabled);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1772,6 +1772,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"裁剪过扫描部分(需重启)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"禁用桌面元素")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS底部屏幕")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"视频驱动")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1590,6 +1590,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Crop Overscan (Reload)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"禁用桌面元素")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS底部屏幕")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"視訊驅動")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1663,6 +1663,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Bildränder (Overscan) zuschneiden (Neustart erforderlich)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Deaktiviere Desktop-Gestaltung")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS-Bildschirm unten")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Videotreiber")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -3066,6 +3066,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Disable Desktop Composition"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Κάτω οθόνη 3DS"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Οδηγός Βίντεο"
|
||||
|
@ -1492,6 +1492,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Crop Overscan (Reload)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Disable Desktop Composition")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS Fundo Ekrano")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Video Driver")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -3028,6 +3028,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Desactivar composición de escritorio"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Pantalla inferior 3DS"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Controlador de video"
|
||||
|
@ -1607,6 +1607,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Tronquer l'overscan (Reload)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Désactiver le compositeur de bureau")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Écran inférieur 3DS")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Pilote vidéo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1637,6 +1637,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Crop Overscan (Ricarica)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Disattiva composizione del Desktop")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS Bottom Screen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Driver Video")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1811,6 +1811,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"オーバースキャンをクロップ(再起動が必要)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"デスクトップコンポジションを無効")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DSボトム画面")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"ビデオのドライバ")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1587,6 +1587,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"오버스캔 잘라내기(재시작)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"데스크탑 구성요소 사용안함")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS 하단 화면")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"비디오 드라이버")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1737,3 +1737,5 @@ MSG_HASH(MENU_ENUM_LABEL_NO_IMAGES_AVAILABLE,
|
||||
"no_images")
|
||||
MSG_HASH(MENU_ENUM_LABEL_NO_FAVORITES_AVAILABLE,
|
||||
"no_favorites")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VIDEO_3DS_LCD_BOTTOM,
|
||||
"video_3ds_lcd_bottom")
|
||||
|
@ -1502,6 +1502,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Overscan Afsnijden (Herladen Vereist)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Desktop Compositie Deactiveren")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS onderste scherm")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Video Driver")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1741,6 +1741,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Przytnij Overscan (Przeładuj)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Wyłącz kompozycję pulpitu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Dolny ekran 3DS")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Sterownik wideo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -3098,6 +3098,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Desativar Composição da Área de Trabalho"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Tela Inferior 3DS"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Driver de Vídeo"
|
||||
|
@ -1579,6 +1579,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Cortar sobreexploração (recarregar)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Desativar composição do ambiente de trabalho")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Tela Inferior 3DS")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Controlador de vídeo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -1616,6 +1616,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Обрезка обрезки (перезагрузка)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Отключить компоновку рабочего стола")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Нижний экран 3DS")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Видеодрайвер")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -3098,6 +3098,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Disable Desktop Composition"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"3DS Bottom Screen"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Video Driver"
|
||||
|
@ -1605,6 +1605,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
|
||||
"Crop Overscan (Reload)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
|
||||
"Disable Desktop Composition")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
"Màn hình dưới 3DS")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER,
|
||||
"Video Driver")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
|
||||
|
@ -559,7 +559,7 @@ static void materialui_render_messagebox(materialui_handle_t *mui,
|
||||
mui->font, msg,
|
||||
x - longest_width/2.0,
|
||||
y + i * line_height + mui->font->size / 3,
|
||||
width, height, font_color, TEXT_ALIGN_LEFT, 1.0f, false, 0);
|
||||
width, height, font_color, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
|
||||
}
|
||||
|
||||
@ -864,7 +864,7 @@ static void materialui_render_label_value(
|
||||
mui->margin + icon_margin,
|
||||
y + (scale_factor / 4) + mui->font->size,
|
||||
width, height, sublabel_color, TEXT_ALIGN_LEFT,
|
||||
1.0f, false, 0);
|
||||
1.0f, false, 0, false);
|
||||
}
|
||||
free(sublabel_str);
|
||||
}
|
||||
@ -872,13 +872,13 @@ static void materialui_render_label_value(
|
||||
menu_display_draw_text(mui->font, label_str,
|
||||
mui->margin + icon_margin,
|
||||
y + (scale_factor / 5),
|
||||
width, height, color, TEXT_ALIGN_LEFT, 1.0f, false, 0);
|
||||
width, height, color, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
|
||||
if (do_draw_text)
|
||||
menu_display_draw_text(mui->font, value_str,
|
||||
width - mui->margin,
|
||||
y + (scale_factor / 5),
|
||||
width, height, color, TEXT_ALIGN_RIGHT, 1.0f, false, 0);
|
||||
width, height, color, TEXT_ALIGN_RIGHT, 1.0f, false, 0, false);
|
||||
|
||||
if (texture_switch2)
|
||||
materialui_draw_icon(video_info,
|
||||
@ -1562,7 +1562,7 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
menu_display_draw_text(mui->font, title_buf,
|
||||
title_margin,
|
||||
header_height / 2 + mui->font->size / 3,
|
||||
width, height, font_header_color, TEXT_ALIGN_LEFT, 1.0f, false, 0);
|
||||
width, height, font_header_color, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
|
||||
materialui_draw_scrollbar(mui, video_info, width, height, &grey_bg[0]);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -668,7 +668,7 @@ static void stripes_draw_text(
|
||||
menu_display_draw_text(font, str, x, y,
|
||||
width, height, color, text_align, scale_factor,
|
||||
video_info->xmb_shadows_enable,
|
||||
stripes->shadow_offset);
|
||||
stripes->shadow_offset, false);
|
||||
}
|
||||
|
||||
static void stripes_messagebox(void *data, const char *message)
|
||||
@ -742,7 +742,7 @@ static void stripes_render_keyboard(
|
||||
width/2.0 - (11*ptr_width)/2.0 + (i % 11) * ptr_width + ptr_width/2.0,
|
||||
height/2.0 + ptr_height + line_y + stripes->font->size / 3,
|
||||
width, height, 0xffffffff, TEXT_ALIGN_CENTER, 1.0f,
|
||||
false, 0);
|
||||
false, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -843,7 +843,7 @@ static void stripes_render_messagebox_internal(
|
||||
menu_display_draw_text(stripes->font, msg,
|
||||
x - longest_width/2.0,
|
||||
y + (i+0.75) * line_height,
|
||||
width, height, 0x444444ff, TEXT_ALIGN_LEFT, 1.0f, false, 0);
|
||||
width, height, 0x444444ff, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
}
|
||||
|
||||
if (menu_input_dialog_get_display_kb())
|
||||
|
@ -833,7 +833,7 @@ static void xmb_draw_text(
|
||||
menu_display_draw_text(font, str, x, y,
|
||||
width, height, color, text_align, scale_factor,
|
||||
video_info->xmb_shadows_enable,
|
||||
xmb->shadow_offset);
|
||||
xmb->shadow_offset, false);
|
||||
}
|
||||
|
||||
static void xmb_messagebox(void *data, const char *message)
|
||||
@ -913,7 +913,7 @@ static void xmb_render_messagebox_internal(
|
||||
menu_display_draw_text(xmb->font, msg,
|
||||
x - longest_width/2.0,
|
||||
y + (i+0.75) * line_height,
|
||||
width, height, 0x444444ff, TEXT_ALIGN_LEFT, 1.0f, false, 0);
|
||||
width, height, 0x444444ff, TEXT_ALIGN_LEFT, 1.0f, false, 0, false);
|
||||
}
|
||||
|
||||
if (menu_input_dialog_get_display_kb())
|
||||
@ -5415,7 +5415,7 @@ static void xmb_toggle(void *userdata, bool menu_on)
|
||||
xmb_toggle_horizontal_list(xmb);
|
||||
}
|
||||
|
||||
static int deferred_push_content_actions(menu_displaylist_info_t *info)
|
||||
static int xmb_deferred_push_content_actions(menu_displaylist_info_t *info)
|
||||
{
|
||||
if (!menu_displaylist_ctl(
|
||||
DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS, info))
|
||||
@ -5432,7 +5432,7 @@ static int xmb_list_bind_init_compare_label(menu_file_list_cbs_t *cbs)
|
||||
switch (cbs->enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_CONTENT_ACTIONS:
|
||||
cbs->action_deferred_push = deferred_push_content_actions;
|
||||
cbs->action_deferred_push = xmb_deferred_push_content_actions;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
|
@ -711,3 +711,30 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void menu_timer_start(menu_timer_t *timer, menu_timer_ctx_entry_t *timer_entry)
|
||||
{
|
||||
menu_animation_ctx_tag tag = (uintptr_t) timer;
|
||||
|
||||
menu_timer_kill(timer);
|
||||
|
||||
*timer = 0.0f;
|
||||
|
||||
menu_animation_ctx_entry_t entry;
|
||||
|
||||
entry.easing_enum = EASING_LINEAR;
|
||||
entry.tag = tag;
|
||||
entry.duration = timer_entry->duration;
|
||||
entry.target_value = 1.0f;
|
||||
entry.subject = timer;
|
||||
entry.cb = timer_entry->cb;
|
||||
entry.userdata = timer_entry->userdata;
|
||||
|
||||
menu_animation_push(&entry);
|
||||
}
|
||||
|
||||
void menu_timer_kill(menu_timer_t *timer)
|
||||
{
|
||||
menu_animation_ctx_tag tag = (uintptr_t) timer;
|
||||
menu_animation_kill_by_tag(&tag);
|
||||
}
|
||||
|
@ -118,6 +118,19 @@ typedef struct menu_animation_ctx_ticker
|
||||
const char *str;
|
||||
} menu_animation_ctx_ticker_t;
|
||||
|
||||
typedef float menu_timer_t;
|
||||
|
||||
typedef struct menu_timer_ctx_entry
|
||||
{
|
||||
float duration;
|
||||
tween_cb cb;
|
||||
void *userdata;
|
||||
} menu_timer_ctx_entry_t;
|
||||
|
||||
void menu_timer_start(menu_timer_t *timer, menu_timer_ctx_entry_t *timer_entry);
|
||||
|
||||
void menu_timer_kill(menu_timer_t *timer);
|
||||
|
||||
bool menu_animation_update(float delta_time);
|
||||
|
||||
bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta);
|
||||
|
@ -6098,6 +6098,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, menu_displaylist
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_UI_COMPANION_TOGGLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
#endif
|
||||
#ifdef _3DS
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_VIDEO_3DS_LCD_BOTTOM,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
#endif
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
|
@ -76,6 +76,13 @@ typedef struct menu_ctx_load_image
|
||||
enum menu_image_type type;
|
||||
} menu_ctx_load_image_t;
|
||||
|
||||
float osk_dark[16] = {
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
};
|
||||
|
||||
/* Menu drivers */
|
||||
static const menu_ctx_driver_t *menu_ctx_drivers[] = {
|
||||
#if defined(HAVE_OZONE)
|
||||
@ -1160,18 +1167,18 @@ void menu_display_draw_texture_slice(
|
||||
vert_coord[2] = V_BR[0] + vert_scaled_mid_width;
|
||||
vert_coord[3] = V_BR[1] - vert_hoff - vert_scaled_mid_height;
|
||||
vert_coord[4] = V_TL[0] + vert_woff;
|
||||
vert_coord[5] = V_TL[1] - vert_scaled_mid_height;
|
||||
vert_coord[5] = V_TL[1] - vert_hoff - vert_scaled_mid_height;
|
||||
vert_coord[6] = V_TR[0] + vert_scaled_mid_width;
|
||||
vert_coord[7] = V_TR[1] - vert_scaled_mid_height;
|
||||
vert_coord[7] = V_TR[1] - vert_hoff - vert_scaled_mid_height;
|
||||
|
||||
tex_coord[0] = T_BL[0] + tex_woff;
|
||||
tex_coord[1] = T_BL[1] + tex_hoff + tex_mid_height;
|
||||
tex_coord[2] = T_BR[0] + tex_mid_width;
|
||||
tex_coord[3] = T_BR[1] + tex_hoff + tex_mid_height;
|
||||
tex_coord[4] = T_TL[0] + tex_woff;
|
||||
tex_coord[5] = T_TL[1] + tex_mid_height;
|
||||
tex_coord[5] = T_TL[1] + tex_hoff + tex_mid_height;
|
||||
tex_coord[6] = T_TR[0] + tex_mid_width;
|
||||
tex_coord[7] = T_TR[1] + tex_mid_height;
|
||||
tex_coord[7] = T_TR[1] + tex_hoff + tex_mid_height;
|
||||
|
||||
menu_display_draw(&draw, video_info);
|
||||
|
||||
@ -1510,12 +1517,6 @@ void menu_display_draw_keyboard(
|
||||
int ptr_width, ptr_height;
|
||||
unsigned width = video_info->width;
|
||||
unsigned height = video_info->height;
|
||||
float dark[16] = {
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
0.00, 0.00, 0.00, 0.85,
|
||||
};
|
||||
|
||||
float white[16]= {
|
||||
1.00, 1.00, 1.00, 1.00,
|
||||
@ -1528,7 +1529,7 @@ void menu_display_draw_keyboard(
|
||||
video_info,
|
||||
0, height/2.0, width, height/2.0,
|
||||
width, height,
|
||||
&dark[0]);
|
||||
&osk_dark[0]);
|
||||
|
||||
ptr_width = width / 11;
|
||||
ptr_height = height / 10;
|
||||
@ -1564,7 +1565,7 @@ void menu_display_draw_keyboard(
|
||||
* ptr_width + ptr_width/2.0,
|
||||
height/2.0 + ptr_height + line_y + font->size / 3,
|
||||
width, height, color, TEXT_ALIGN_CENTER, 1.0f,
|
||||
false, 0);
|
||||
false, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1574,13 +1575,15 @@ void menu_display_draw_text(
|
||||
const font_data_t *font, const char *text,
|
||||
float x, float y, int width, int height,
|
||||
uint32_t color, enum text_alignment text_align,
|
||||
float scale, bool shadows_enable, float shadow_offset)
|
||||
float scale, bool shadows_enable, float shadow_offset,
|
||||
bool draw_outside)
|
||||
{
|
||||
struct font_params params;
|
||||
|
||||
/* Don't draw outside of the screen */
|
||||
if ( (x < -64 || x > width + 64)
|
||||
|| (y < -64 || y > height + 64)
|
||||
if ( ((x < -64 || x > width + 64)
|
||||
|| (y < -64 || y > height + 64))
|
||||
&& !draw_outside
|
||||
)
|
||||
return;
|
||||
|
||||
|
@ -57,6 +57,8 @@ RETRO_BEGIN_DECLS
|
||||
#define MENU_SETTINGS_CHEEVOS_START 0x40000
|
||||
#define MENU_SETTINGS_NETPLAY_ROOMS_START 0x80000
|
||||
|
||||
extern float osk_dark[16];
|
||||
|
||||
enum menu_image_type
|
||||
{
|
||||
MENU_IMAGE_NONE = 0,
|
||||
@ -811,7 +813,8 @@ void menu_display_draw_text(
|
||||
const font_data_t *font, const char *text,
|
||||
float x, float y, int width, int height,
|
||||
uint32_t color, enum text_alignment text_align,
|
||||
float scale_factor, bool shadows_enable, float shadow_offset);
|
||||
float scale_factor, bool shadows_enable, float shadow_offset,
|
||||
bool draw_outside);
|
||||
|
||||
#define menu_display_set_alpha(color, alpha_value) (color[3] = color[7] = color[11] = color[15] = (alpha_value))
|
||||
|
||||
|
@ -4081,7 +4081,6 @@ static bool setting_append_list(
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
CONFIG_ACTION(
|
||||
list, list_info,
|
||||
@ -8685,6 +8684,24 @@ static bool setting_append_list(
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
#endif
|
||||
|
||||
#ifdef _3DS
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.video_3ds_lcd_bottom,
|
||||
MENU_ENUM_LABEL_VIDEO_3DS_LCD_BOTTOM,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM,
|
||||
video_3ds_lcd_bottom,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_CMD_APPLY_AUTO);
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT_FROM_TOGGLE);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
|
@ -874,6 +874,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(UI_COMPANION_TOGGLE),
|
||||
MENU_LABEL(DESKTOP_MENU_ENABLE),
|
||||
MENU_LABEL(UI_MENUBAR_ENABLE),
|
||||
MENU_LABEL(VIDEO_3DS_LCD_BOTTOM),
|
||||
|
||||
MENU_ENUM_LABEL_FILE_CONFIG,
|
||||
MENU_ENUM_LABEL_FILE_BROWSER_COMPRESSED_ARCHIVE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user