hopefully fix windows build

This commit is contained in:
olebeck 2025-07-07 17:36:08 +02:00
parent e135bf5595
commit feafa3c75e
6 changed files with 80 additions and 61 deletions

View File

@ -26,12 +26,21 @@
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "mingw64",
"inherits": ["release"],
"toolchainFile": "CMake/cmake-toolchain-mingw64-x86_64.cmake"
},
{
"name": "mingw64-debug",
"inherits": ["mingw64", "debug"]
},
{
"name": "vita",
"inherits": ["release"],
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VITASDK}/share/vita.toolchain.cmake"
}
"toolchainFile": "$env{VITASDK}/share/vita.toolchain.cmake"
},
{
"name": "vita-debug",

View File

@ -37,7 +37,7 @@ if(WIN32)
install(CODE "message(STATUS \"Running windeployqt with minimal dependencies\")
execute_process(COMMAND \"${WINDEPLOYQT_EXECUTABLE}\"
\"$<TARGET_FILE:isle-config>\"
--dir QTLibs
--dir ${CMAKE_CURRENT_BINARY_DIR}/QTLibs
--no-compiler-runtime
--no-opengl-sw
--no-system-d3d-compiler
@ -45,7 +45,7 @@ if(WIN32)
--no-quick-import
)"
)
install(DIRECTORY "Build/QTLibs/" DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/QTLibs/" DESTINATION "${CMAKE_INSTALL_BINDIR}")
else()
message(STATUS "windeployqt not found: Qt binaries will not be installed")
endif()

View File

@ -1,57 +1,68 @@
#include <paf.h>
#include <psp2/kernel/clib.h>
#include <psp2/kernel/modulemgr.h>
#include <psp2/kernel/processmgr.h>
#include <psp2/kernel/clib.h>
#include <psp2/sysmodule.h>
#include <paf.h>
char sceUserMainThreadName[] = "paf_sample";
int sceUserMainThreadPriority = 0x10000100;
int sceUserMainThreadCpuAffinityMask = 0x70000;
SceSize sceUserMainThreadStackSize = 0x4000;
char sceUserMainThreadName[] = "paf_sample";
int sceUserMainThreadPriority = 0x10000100;
int sceUserMainThreadCpuAffinityMask = 0x70000;
SceSize sceUserMainThreadStackSize = 0x4000;
void operator delete(void *ptr, unsigned int n) {
void operator delete(void* ptr, unsigned int n)
{
return sce_paf_free(ptr);
}
int paf_main(void);
typedef struct _ScePafInit { // size is 0x18
SceSize global_heap_size;
int a2;
int a3;
int cdlg_mode;
int heap_opt_param1;
int heap_opt_param2;
SceSize global_heap_size;
int a2;
int a3;
int cdlg_mode;
int heap_opt_param1;
int heap_opt_param2;
} ScePafInit;
extern "C" int module_start(SceSize args, void *argp) {
int load_res;
ScePafInit init_param;
SceSysmoduleOpt sysmodule_opt;
extern "C" int module_start(SceSize args, void* argp)
{
int load_res;
ScePafInit init_param;
SceSysmoduleOpt sysmodule_opt;
init_param.global_heap_size = 0x1000000;
init_param.a2 = 0xEA60;
init_param.a3 = 0x40000;
init_param.cdlg_mode = 0;
init_param.heap_opt_param1 = 0;
init_param.heap_opt_param2 = 0;
init_param.global_heap_size = 0x1000000;
init_param.a2 = 0xEA60;
init_param.a3 = 0x40000;
init_param.cdlg_mode = 0;
init_param.heap_opt_param1 = 0;
init_param.heap_opt_param2 = 0;
load_res = 0xDEADBEEF;
sysmodule_opt.flags = 0;
sysmodule_opt.result = &load_res;
load_res = 0xDEADBEEF;
sysmodule_opt.flags = 0;
sysmodule_opt.result = &load_res;
int res = sceSysmoduleLoadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, sizeof(init_param), &init_param, &sysmodule_opt);
if((res | load_res) != 0){
sceClibPrintf("[PAF PRX Loader] Failed to load the PAF prx. (return value 0x%x, result code 0x%x )\n", res, load_res);
}
int res = sceSysmoduleLoadModuleInternalWithArg(
SCE_SYSMODULE_INTERNAL_PAF,
sizeof(init_param),
&init_param,
&sysmodule_opt
);
if ((res | load_res) != 0) {
sceClibPrintf(
"[PAF PRX Loader] Failed to load the PAF prx. (return value 0x%x, result code 0x%x )\n",
res,
load_res
);
}
paf_main();
paf_main();
return SCE_KERNEL_START_SUCCESS;
return SCE_KERNEL_START_SUCCESS;
}
extern "C" void _start() {
module_start(0, nullptr);
extern "C" void _start()
{
module_start(0, nullptr);
}

View File

@ -1,42 +1,41 @@
#include <psp2/kernel/clib.h>
#include <paf.h>
#include <psp2/kernel/clib.h>
paf::Framework* g_fw;
paf::ui::Scene* g_rootPage;
void loadPluginCB(paf::Plugin *plugin){
void loadPluginCB(paf::Plugin* plugin)
{
paf::Plugin::PageOpenParam pageOpenParam;
pageOpenParam.option = paf::Plugin::PageOption_None;
paf::ui::Scene *pScene = plugin->PageOpen("page_main", pageOpenParam);
paf::ui::Scene* pScene = plugin->PageOpen("page_main", pageOpenParam);
g_rootPage = pScene;
paf::ui::Widget *pText = (paf::ui::Text*)pScene->FindChild("test_strings_id");
paf::ui::Widget* pText = (paf::ui::Text*) pScene->FindChild("test_strings_id");
pText->SetString(L"Test Text");
}
int paf_main(void){
int paf_main(void)
{
paf::Framework::InitParam fwParam;
fwParam.mode = paf::Framework::Mode_Normal;
paf::Framework *paf_fw = new paf::Framework(fwParam);
if(paf_fw != NULL){
paf::Framework* paf_fw = new paf::Framework(fwParam);
if (paf_fw != NULL) {
g_fw = paf_fw;
paf_fw->LoadCommonResourceSync();
paf::Plugin::InitParam pluginParam;
pluginParam.name = "config_plugin";
pluginParam.caller_name = "__main__";
pluginParam.name = "config_plugin";
pluginParam.caller_name = "__main__";
pluginParam.resource_file = "app0:/config_plugin.rco";
pluginParam.init_func = NULL;
pluginParam.start_func = loadPluginCB;
pluginParam.stop_func = NULL;
pluginParam.exit_func = NULL;
pluginParam.init_func = NULL;
pluginParam.start_func = loadPluginCB;
pluginParam.stop_func = NULL;
pluginParam.exit_func = NULL;
paf::Plugin::LoadSync(pluginParam);
paf_fw->Run();
@ -46,4 +45,4 @@ int paf_main(void){
exit(0);
return 0;
}
}

View File

@ -1581,8 +1581,8 @@ void GXMRenderer::Flip()
void GXMRenderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, const SDL_Rect& dstRect, FColor color)
{
this->StartScene();
if(!this->cleared) {
gxm->clear(0,0,0, false);
if (!this->cleared) {
gxm->clear(0, 0, 0, false);
this->cleared = true;
}

View File

@ -40,8 +40,8 @@ struct Direct3DRMDevice2Impl : public Direct3DRMObjectBaseImpl<IDirect3DRMDevice
private:
void Resize();
int32_t m_windowWidth;
int32_t m_windowHeight;
int m_windowWidth;
int m_windowHeight;
uint32_t m_virtualWidth;
uint32_t m_virtualHeight;
ViewportTransform m_viewportTransform;