port: grp.SaveScreenShot via next-frame swapchain readback + JPEG

CPythonGraphic::SaveScreenShot queues a readback of the next presented
frame (ScreenShotHost -> VulkanWindow::request_frame); WriteScreenShot runs
the rest of 40250's function verbatim (X8R8G8B8 rows, SaveJPEG, EXIF tag).
jpeg_save is encoded with stb_image_write. SHGetSpecialFolderPath returns
$HOME/Documents (else cwd); CreateDirectory/_access/jpeg_save accept '\\'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 12:43:03 +09:00
co-authored by Claude Opus 5.5
parent c21e012965
commit bda85eea50
17 changed files with 2211 additions and 12 deletions
+2
View File
@@ -599,3 +599,5 @@
{"date": "2026-09-30T03:32:49+00:00", "unit": "UserInterface/PythonApplicationLogo.cpp", "action": "correction: N_A: CPythonApplication::OnLogo* has no caller: intrologo.py calls app.OnLogoOpen/Update/Render/Close, but those bind appLogo* in PythonApplicationModule.cpp, whose CPythonApplication::OnLogo* calls are commented out", "evidence": "LC_ALL=C grep app.OnLogo over the root .py (intrologo.py); PythonApplicationModule.cpp:1165-1195 (the earlier grep ran without LC_ALL=C and missed the CP949 scripts)"}
{"date": "2026-09-30T03:32:49+00:00", "unit": "UserInterface/MovieMan.cpp", "action": "correction: N_A: reached at boot through prototype.py SetLogoPhase -> intrologo.py app.OnLogoOpen(\"logo1.avi\"/\"logo2.avi\") -> CMovieMan::PlayLogo -> PlayMovie(<cwd>\\\\logoN.avi), but the 40250 Client ships no .avi, so RenderFileToMMStream fails and nothing is shown; PlayIntro/PlayTutorial have no caller. The port stub matches that outcome", "evidence": "find Client -iname *.avi: none; LC_ALL=C grep PlayIntro/PlayTutorial over ClientVS22/source (the earlier grep ran without LC_ALL=C and missed the CP949 scripts)"}
{"date": "2026-09-30T03:32:49+00:00", "unit": "UserInterface/PythonApplicationWebPage.cpp", "action": "correction: DIVERGENT: reachable: game.py __InGameShop_Show -> interfacemodule.OpenWebWindow -> uiweb.py app.ShowWebPage when constInfo.IN_GAME_SHOP_ENABLE (localeinfo sets it per locale), and uishop.MallPageDialog; the port has no embedded browser, so ShowWebPage/MoveWebPage/HideWebPage are stubs in platform/UserInterface/PythonApplication.cpp", "evidence": "LC_ALL=C grep ShowWebPage/uiweb/IN_GAME_SHOP_ENABLE over the root .py (the earlier grep ran without LC_ALL=C and missed the CP949 scripts)"}
{"date": "2026-09-30", "unit": "EterLib/JpegFile.cpp", "action": "jpeg_save ADAPTED (stb_image_write), destination managers + unused load/save_to_mem N_A", "evidence": "tests/port/port_screenshot_test.cpp; only CPythonGraphic::SaveJPEG calls jpeg_save"}
{"date": "2026-09-30", "unit": "EterPythonLib/PythonGraphic.cpp", "action": "GenScreenShotTag/SaveJPEG PORTED, SaveScreenShot ADAPTED (next-frame readback via ScreenShotHost)", "evidence": "port.screenshot; desktop grp.SaveScreenShot() -> ~/Documents/METIN2/0930_124051.jpg, colours checked"}