Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
blueminder committed Feb 4, 2023
2 parents b5a5c14 + badf368 commit 39dfd5d
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 32 deletions.
4 changes: 3 additions & 1 deletion core/emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,9 @@ void Emulator::vblank()
if (sh4_sched_now64() - startTime <= 10000000)
return;
renderTimeout = true;
if (!ggpo::active() && !config::ThreadedRendering)
if (ggpo::active())
ggpo::endOfFrame();
else if (!config::ThreadedRendering)
sh4_cpu.Stop();
}

Expand Down
3 changes: 2 additions & 1 deletion core/hw/arm7/arm7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ static void CPUSwitchMode(int mode, bool saveState)
reg[RN_SPSR].I = reg[SPSR_UND].I;
break;
default:
// An illegal mode causes the processor to enter an unrecoverable state
ERROR_LOG(AICA_ARM, "Unsupported ARM mode %02x", mode);
die("Arm error..");
Arm7Enabled = false;
break;
}
armMode = mode;
Expand Down
3 changes: 3 additions & 0 deletions core/hw/pvr/Renderer_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ void rend_start_render()
ctx->rend.fog_clamp_min = FOG_CLAMP_MIN;
ctx->rend.fog_clamp_max = FOG_CLAMP_MAX;

if (!ctx->rend.isRTT)
ggpo::endOfFrame();

if (QueueRender(ctx))
{
palette_update();
Expand Down
1 change: 0 additions & 1 deletion core/hw/pvr/spg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ static int spg_line_sched(int tag, int cycles, int jitter)
SB_MDST = 0;
}
asic_RaiseInterrupt(holly_SCANINT1);
ggpo::endOfFrame();
}

if (SPG_VBLANK_INT.vblank_out_interrupt_line_number == prv_cur_scanline)
Expand Down
5 changes: 5 additions & 0 deletions core/hw/pvr/ta_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ void sortTriangles(rend_context& ctx, RenderPass& pass, const RenderPass& previo
SortedTriangle& last = ctx.sortedTriangles.back();
last.count = idxSize + triangleList.size() * 3 - last.first;
}
else
{
// Add a dummy one to signal we're using sorted triangles
ctx.sortedTriangles.push_back({ pp_base, 0, 0});
}
pass.sorted_tr_count = ctx.sortedTriangles.size();

#if PRINT_SORT_STATS
Expand Down
6 changes: 3 additions & 3 deletions core/rend/vulkan/vulkan_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@ void VulkanContext::CreateSwapChain()
vk::Extent2D swapchainExtent;
if (surfaceCapabilities.currentExtent.width == std::numeric_limits<uint32_t>::max())
{
// If the surface size is undefined, the size is set to the size of the images requested.
swapchainExtent.width = std::min(std::max(640u, surfaceCapabilities.minImageExtent.width), surfaceCapabilities.maxImageExtent.width);
swapchainExtent.height = std::min(std::max(480u, surfaceCapabilities.minImageExtent.height), surfaceCapabilities.maxImageExtent.height);
// If the surface size is undefined, use the current display size
swapchainExtent.width = std::min(std::max((u32)settings.display.width, surfaceCapabilities.minImageExtent.width), surfaceCapabilities.maxImageExtent.width);
swapchainExtent.height = std::min(std::max((u32)settings.display.height, surfaceCapabilities.minImageExtent.height), surfaceCapabilities.maxImageExtent.height);
}
else
{
Expand Down
13 changes: 8 additions & 5 deletions core/rend/vulkan/vulkan_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class BaseVulkanRenderer : public Renderer
texCommandPool.Term();
fbCommandPool.Term();
framebufferTextures.clear();
framebufferTexIndex = 0;
shaderManager.term();
}

Expand Down Expand Up @@ -146,8 +147,6 @@ class BaseVulkanRenderer : public Renderer
CheckFogTexture();
CheckPaletteTexture();
texCommandBuffer.end();
if (!ctx->rend.isRTT)
framebufferRendered = false;
}
else
{
Expand Down Expand Up @@ -215,9 +214,11 @@ class BaseVulkanRenderer : public Renderer

void RenderFramebuffer(const FramebufferInfo& info) override
{
framebufferTexIndex = (framebufferTexIndex + 1) % GetContext()->GetSwapChainSize();

if (framebufferTextures.size() != GetContext()->GetSwapChainSize())
framebufferTextures.resize(GetContext()->GetSwapChainSize());
std::unique_ptr<Texture>& curTexture = framebufferTextures[GetContext()->GetCurrentImageIndex()];
std::unique_ptr<Texture>& curTexture = framebufferTextures[framebufferTexIndex];
if (!curTexture)
{
curTexture = std::unique_ptr<Texture>(new Texture());
Expand Down Expand Up @@ -303,13 +304,14 @@ class BaseVulkanRenderer : public Renderer

bool presentFramebuffer()
{
if (GetContext()->GetCurrentImageIndex() >= (int)framebufferTextures.size())
if (framebufferTexIndex >= (int)framebufferTextures.size())
return false;
Texture *fbTexture = framebufferTextures[GetContext()->GetCurrentImageIndex()].get();
Texture *fbTexture = framebufferTextures[framebufferTexIndex].get();
if (fbTexture == nullptr)
return false;
GetContext()->PresentFrame(fbTexture->GetImage(), fbTexture->GetImageView(), fbTexture->getSize(),
getDCFramebufferAspectRatio());
framebufferRendered = false;
return true;
}

Expand All @@ -318,6 +320,7 @@ class BaseVulkanRenderer : public Renderer
std::unique_ptr<Texture> paletteTexture;
CommandPool texCommandPool;
std::vector<std::unique_ptr<Texture>> framebufferTextures;
int framebufferTexIndex = 0;
OSDPipeline osdPipeline;
std::unique_ptr<Texture> vjoyTexture;
std::unique_ptr<BufferData> osdBuffer;
Expand Down
24 changes: 23 additions & 1 deletion core/sdl/sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <SDL_syswm.h>
#endif
#include <SDL_video.h>
#if defined(__APPLE__) && defined(USE_VULKAN)
#if defined(USE_VULKAN)
#include <SDL_vulkan.h>
#endif
#endif
Expand All @@ -29,6 +29,7 @@
#endif

static SDL_Window* window = NULL;
static u32 windowFlags;

#ifdef TARGET_PANDORA
#define WINDOW_WIDTH 800
Expand Down Expand Up @@ -292,6 +293,26 @@ void input_sdl_handle()
|| event.window.event == SDL_WINDOWEVENT_MINIMIZED
|| event.window.event == SDL_WINDOWEVENT_MAXIMIZED)
{
if (event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED
&& event.window.data1 != 0 && event.window.data2 != 0)
{
settings.display.width = event.window.data1;
settings.display.height = event.window.data2;
}
else
{
#ifdef USE_VULKAN
if (windowFlags & SDL_WINDOW_VULKAN)
SDL_Vulkan_GetDrawableSize(window, &settings.display.width, &settings.display.height);
else
#endif
#ifdef USE_OPENGL
if (windowFlags & SDL_WINDOW_OPENGL)
SDL_GL_GetDrawableSize(window, &settings.display.width, &settings.display.height);
else
#endif
SDL_GetWindowSize(window, &settings.display.width, &settings.display.height);
}
GraphicsContext::Instance()->resize();
}
else if (event.window.event == SDL_WINDOWEVENT_FOCUS_GAINED)
Expand Down Expand Up @@ -473,6 +494,7 @@ HWND getNativeHwnd()

bool sdl_recreate_window(u32 flags)
{
windowFlags = flags;
#ifdef _WIN32
//Enable HiDPI mode in Windows
typedef enum PROCESS_DPI_AWARENESS {
Expand Down
4 changes: 2 additions & 2 deletions shell/android-studio/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.0' apply false
id 'com.android.library' version '7.4.0' apply false
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
}

task clean(type: Delete) {
Expand Down
36 changes: 18 additions & 18 deletions shell/libretro/libretro_core_options_intl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8517,7 +8517,7 @@ struct retro_core_options_v2 options_cht = {
#define OPTION_VAL_FRENCH_CS "Francouzština"
#define OPTION_VAL_SPANISH_CS "Španělština"
#define OPTION_VAL_ITALIAN_CS "Italský"
#define CORE_OPTION_NAME_HLE_BIOS_LABEL_CS NULL
#define CORE_OPTION_NAME_HLE_BIOS_LABEL_CS "HLE BIOS (nutný restart)"
#define CORE_OPTION_NAME_HLE_BIOS_INFO_0_CS "Vynucení použití vysokoúrovňové emulace systému BIOS."
#define CORE_OPTION_NAME_BOOT_TO_BIOS_LABEL_CS "Nabootovat Bios (Nutný Restart)"
#define CORE_OPTION_NAME_BOOT_TO_BIOS_INFO_0_CS "Spustit přímo do menu Dreamcast BIOS."
Expand All @@ -8529,10 +8529,10 @@ struct retro_core_options_v2 options_cht = {
#define CORE_OPTION_NAME_ALLOW_SERVICE_BUTTONS_INFO_0_CS "Povolí tlačítko SERVIS pro NAOMI, abyste mohli vstoupit do nastavení skříně."
#define CORE_OPTION_NAME_FORCE_FREEPLAY_LABEL_CS "Nastavení her NAOMI na volné hraní"
#define CORE_OPTION_NAME_FORCE_FREEPLAY_INFO_0_CS "Upravte nastavení mincí ve hře na volnou hru."
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_CS NULL
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_CS NULL
#define CORE_OPTION_NAME_UPNP_LABEL_CS NULL
#define CORE_OPTION_NAME_UPNP_INFO_0_CS NULL
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_CS "Emulace širokopásmového adaptéru"
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_CS "Místo modemu emulujte širokopásmový adaptér ethernetu. (nutný restart)"
#define CORE_OPTION_NAME_UPNP_LABEL_CS "Povolit UPnP"
#define CORE_OPTION_NAME_UPNP_INFO_0_CS "Pomocí UPnP můžete automaticky nakonfigurovat svůj internetový směrovač pro online hry."
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_LABEL_CS "Vnitřní Rozlišení"
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_INFO_0_CS "Úprava Rozlišení Vykreslování."
#define OPTION_VAL_320X240_CS NULL
Expand Down Expand Up @@ -13590,10 +13590,10 @@ struct retro_core_options_v2 options_da = {
#define CORE_OPTION_NAME_ALLOW_SERVICE_BUTTONS_INFO_0_DE "Aktiviert den SERVICE-Knopf für NAOMI, um die Automateneinstellungen aufzurufen."
#define CORE_OPTION_NAME_FORCE_FREEPLAY_LABEL_DE "NAOMI Spiele auf kostenloses Spiel setzen"
#define CORE_OPTION_NAME_FORCE_FREEPLAY_INFO_0_DE "Ändert die Münzeinstellungen des Spiels zu kostenlos."
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_DE "Breitband-Adapter Emulation"
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_DE "Den Ethernet Breitband-Adapter anstelle des Modems emulieren. (Neustart erforderlich)"
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_DE "Breitbandadapter-Emulation"
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_DE "Den Ethernet-Breitbandadapter anstelle des Modems emulieren. (Neustart erforderlich)"
#define CORE_OPTION_NAME_UPNP_LABEL_DE "UPnP aktivieren"
#define CORE_OPTION_NAME_UPNP_INFO_0_DE "Verwendet UPnP, um den Internet Router automatisch für Onlinespiele zu konfigurieren."
#define CORE_OPTION_NAME_UPNP_INFO_0_DE "Verwendet UPnP, um den Internetrouter automatisch für Onlinespiele zu konfigurieren."
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_LABEL_DE "Interne Auflösung"
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_INFO_0_DE "Rendering-Auflösung ändern."
#define OPTION_VAL_320X240_DE "320 x 240"
Expand Down Expand Up @@ -25387,7 +25387,7 @@ struct retro_core_options_v2 options_fi = {
#define OPTION_VAL_FRENCH_FR "Français"
#define OPTION_VAL_SPANISH_FR "Espagnol"
#define OPTION_VAL_ITALIAN_FR "Italien"
#define CORE_OPTION_NAME_HLE_BIOS_LABEL_FR NULL
#define CORE_OPTION_NAME_HLE_BIOS_LABEL_FR "BIOS HLE (Redémarrage requis)"
#define CORE_OPTION_NAME_HLE_BIOS_INFO_0_FR "Forcer l'utilisation d'un BIOS en émulation de haut niveau."
#define CORE_OPTION_NAME_BOOT_TO_BIOS_LABEL_FR "Démarrer sur le BIOS (Redémarrage requis)"
#define CORE_OPTION_NAME_BOOT_TO_BIOS_INFO_0_FR "Démarrer directement sur le menu BIOS Dreamcast."
Expand All @@ -25399,10 +25399,10 @@ struct retro_core_options_v2 options_fi = {
#define CORE_OPTION_NAME_ALLOW_SERVICE_BUTTONS_INFO_0_FR "Active le bouton SERVICE pour NAOMI, pour entrer dans les paramètres de la borne."
#define CORE_OPTION_NAME_FORCE_FREEPLAY_LABEL_FR "Définir les jeux NAOMI en Free Play"
#define CORE_OPTION_NAME_FORCE_FREEPLAY_INFO_0_FR "Modifier les réglages de pièces du jeu en mode gratuit."
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_FR NULL
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_FR NULL
#define CORE_OPTION_NAME_UPNP_LABEL_FR NULL
#define CORE_OPTION_NAME_UPNP_INFO_0_FR NULL
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_FR "Émulation de l'adaptateur haut débit"
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_FR "Émuler l'adaptateur haut débit Ethernet au lieu du modem. (Redémarrage requis)"
#define CORE_OPTION_NAME_UPNP_LABEL_FR "Activer l'UPnP"
#define CORE_OPTION_NAME_UPNP_INFO_0_FR "Utilisez l'UPnP pour configurer automatiquement votre routeur Internet pour les jeux en ligne."
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_LABEL_FR "Résolution interne"
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_INFO_0_FR "Modifier la résolution de rendu."
#define OPTION_VAL_320X240_FR NULL
Expand Down Expand Up @@ -55753,7 +55753,7 @@ struct retro_core_options_v2 options_sv = {
#define OPTION_VAL_FRENCH_TR "Fransızca"
#define OPTION_VAL_SPANISH_TR "İspanyolca"
#define OPTION_VAL_ITALIAN_TR "İtalyanca"
#define CORE_OPTION_NAME_HLE_BIOS_LABEL_TR NULL
#define CORE_OPTION_NAME_HLE_BIOS_LABEL_TR "HLE BIOS (Yeniden Başlatılmalı)"
#define CORE_OPTION_NAME_HLE_BIOS_INFO_0_TR "Yüksek seviyeli taklit BIOS kullanımını zorunlu kılın."
#define CORE_OPTION_NAME_BOOT_TO_BIOS_LABEL_TR "BIOS Önyükleme (Yeniden Başlatılmalı)"
#define CORE_OPTION_NAME_BOOT_TO_BIOS_INFO_0_TR "Doğrudan Dreamcast BIOS menüsüne önyükleme yapın."
Expand All @@ -55765,10 +55765,10 @@ struct retro_core_options_v2 options_sv = {
#define CORE_OPTION_NAME_ALLOW_SERVICE_BUTTONS_INFO_0_TR "Kabin ayarlarına girmek için NAOMI için SERVICE düğmesini etkinleştirir."
#define CORE_OPTION_NAME_FORCE_FREEPLAY_LABEL_TR "NAOMI Oyunlarını Serbest Oynamaya Ayarlayın"
#define CORE_OPTION_NAME_FORCE_FREEPLAY_INFO_0_TR "Serbest oynamak için oyunun jeton ayarlarını değiştirin."
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_TR NULL
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_TR NULL
#define CORE_OPTION_NAME_UPNP_LABEL_TR NULL
#define CORE_OPTION_NAME_UPNP_INFO_0_TR NULL
#define CORE_OPTION_NAME_EMULATE_BBA_LABEL_TR "Geniş Bant Adaptör Taklidi"
#define CORE_OPTION_NAME_EMULATE_BBA_INFO_0_TR "Modem yerine ethernet geniş bant adaptörünü taklit edin. (Yeniden Başlatılmalı)"
#define CORE_OPTION_NAME_UPNP_LABEL_TR "UPnP Etkinleştir"
#define CORE_OPTION_NAME_UPNP_INFO_0_TR "İnternet yönlendiricinizi çevrimiçi oyunlar için otomatik olarak yapılandırmak üzere UPnP kullanın."
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_LABEL_TR "Dahili Çözünürlük"
#define CORE_OPTION_NAME_INTERNAL_RESOLUTION_INFO_0_TR "İşleme çözünürlüğünü değiştirin."
#define OPTION_VAL_320X240_TR NULL
Expand Down

0 comments on commit 39dfd5d

Please sign in to comment.