Merge pull request #11784 from Minty-Meeo/mgba-screen-api

GBACore.cpp: Update to revised screen size/info API
This commit is contained in:
Admiral H. Curtiss 2023-04-23 16:10:51 +02:00 committed by GitHub
commit 5df7c8833a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

2
Externals/mGBA/mgba vendored

@ -1 +1 @@
Subproject commit 89f8873df366a99dfdf40347f72e68763fb50bd9
Subproject commit 8739b22fbc90fdf0b4f6612ef9c0520f0ba44a51

View File

@ -150,23 +150,25 @@
<ClCompile Include="mgba\src\util\crc32.c" />
<ClCompile Include="mgba\src\util\formatting.c" />
<ClCompile Include="mgba\src\util\gbk-table.c" />
<ClCompile Include="mgba\src\util\geometry.c" />
<ClCompile Include="mgba\src\util\hash.c" />
<ClCompile Include="mgba\src\util\image.c" />
<ClCompile Include="mgba\src\util\string.c" />
<ClCompile Include="mgba\src\util\table.c" />
<ClCompile Include="mgba\src\util\vector.c" />
<ClCompile Include="mgba\src\util\vfs.c" />
<ClCompile Include="mgba\src\util\convolve.c" />
<ClCompile Include="mgba\src\util\elf-read.c" />
<ClCompile Include="mgba\src\util\export.c" />
<ClCompile Include="mgba\src\util\patch.c" />
<ClCompile Include="mgba\src\util\patch-fast.c" />
<ClCompile Include="mgba\src\util\patch-ips.c" />
<ClCompile Include="mgba\src\util\patch-ups.c" />
<ClCompile Include="mgba\src\util\png-io.c" />
<ClCompile Include="mgba\src\util\ring-fifo.c" />
<ClCompile Include="mgba\src\util\sfo.c" />
<ClCompile Include="mgba\src\util\text-codec.c" />
<ClCompile Include="version.c" />
<ClCompile Include="mgba\src\util\image\export.c" />
<ClCompile Include="mgba\src\util\image\png-io.c" />
<ClCompile Include="mgba\src\util\vfs\vfs-mem.c" />
<ClCompile Include="mgba\src\util\vfs\vfs-fifo.c" />
<ClCompile Include="mgba\src\util\vfs\vfs-fd.c" />
@ -214,6 +216,7 @@
<ClCompile Include="mgba\src\feature\thread-proxy.c" />
<ClCompile Include="mgba\src\feature\updater.c" />
<ClCompile Include="mgba\src\feature\video-logger.c" />
<ClCompile Include="mgba\src\feature\video-backend.c" />
</ItemGroup>
<Import Project="$(ExternalsDir)zlib-ng\exports.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@ -305,7 +305,7 @@ CoreInfo Core::GetCoreInfo() const
info.has_rom = !m_rom_path.empty();
info.has_ereader =
info.is_gba && static_cast<::GBA*>(m_core->board)->memory.hw.devices & HW_EREADER;
m_core->desiredVideoDimensions(m_core, &info.width, &info.height);
m_core->currentVideoSize(m_core, &info.width, &info.height);
info.game_title = m_game_title;
return info;
}
@ -392,7 +392,7 @@ void Core::SetSIODriver()
void Core::SetVideoBuffer()
{
u32 width, height;
m_core->desiredVideoDimensions(m_core, &width, &height);
m_core->currentVideoSize(m_core, &width, &height);
m_video_buffer.resize(width * height);
m_core->setVideoBuffer(m_core, m_video_buffer.data(), width);
if (auto host = m_host.lock())