mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-20 06:01:16 +00:00
hopefully fix windows build
This commit is contained in:
parent
e135bf5595
commit
feafa3c75e
@ -26,12 +26,21 @@
|
|||||||
"CMAKE_BUILD_TYPE": "Debug"
|
"CMAKE_BUILD_TYPE": "Debug"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "mingw64",
|
||||||
|
"inherits": ["release"],
|
||||||
|
"toolchainFile": "CMake/cmake-toolchain-mingw64-x86_64.cmake"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mingw64-debug",
|
||||||
|
"inherits": ["mingw64", "debug"]
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "vita",
|
"name": "vita",
|
||||||
"inherits": ["release"],
|
"inherits": ["release"],
|
||||||
"cacheVariables": {
|
"toolchainFile": "$env{VITASDK}/share/vita.toolchain.cmake"
|
||||||
"CMAKE_TOOLCHAIN_FILE": "$env{VITASDK}/share/vita.toolchain.cmake"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vita-debug",
|
"name": "vita-debug",
|
||||||
|
|||||||
@ -37,7 +37,7 @@ if(WIN32)
|
|||||||
install(CODE "message(STATUS \"Running windeployqt with minimal dependencies\")
|
install(CODE "message(STATUS \"Running windeployqt with minimal dependencies\")
|
||||||
execute_process(COMMAND \"${WINDEPLOYQT_EXECUTABLE}\"
|
execute_process(COMMAND \"${WINDEPLOYQT_EXECUTABLE}\"
|
||||||
\"$<TARGET_FILE:isle-config>\"
|
\"$<TARGET_FILE:isle-config>\"
|
||||||
--dir QTLibs
|
--dir ${CMAKE_CURRENT_BINARY_DIR}/QTLibs
|
||||||
--no-compiler-runtime
|
--no-compiler-runtime
|
||||||
--no-opengl-sw
|
--no-opengl-sw
|
||||||
--no-system-d3d-compiler
|
--no-system-d3d-compiler
|
||||||
@ -45,7 +45,7 @@ if(WIN32)
|
|||||||
--no-quick-import
|
--no-quick-import
|
||||||
)"
|
)"
|
||||||
)
|
)
|
||||||
install(DIRECTORY "Build/QTLibs/" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/QTLibs/" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||||
else()
|
else()
|
||||||
message(STATUS "windeployqt not found: Qt binaries will not be installed")
|
message(STATUS "windeployqt not found: Qt binaries will not be installed")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -1,57 +1,68 @@
|
|||||||
|
|
||||||
|
#include <paf.h>
|
||||||
|
#include <psp2/kernel/clib.h>
|
||||||
#include <psp2/kernel/modulemgr.h>
|
#include <psp2/kernel/modulemgr.h>
|
||||||
#include <psp2/kernel/processmgr.h>
|
#include <psp2/kernel/processmgr.h>
|
||||||
#include <psp2/kernel/clib.h>
|
|
||||||
#include <psp2/sysmodule.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";
|
void operator delete(void* ptr, unsigned int n)
|
||||||
int sceUserMainThreadPriority = 0x10000100;
|
{
|
||||||
int sceUserMainThreadCpuAffinityMask = 0x70000;
|
|
||||||
SceSize sceUserMainThreadStackSize = 0x4000;
|
|
||||||
|
|
||||||
void operator delete(void *ptr, unsigned int n) {
|
|
||||||
return sce_paf_free(ptr);
|
return sce_paf_free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
int paf_main(void);
|
int paf_main(void);
|
||||||
|
|
||||||
typedef struct _ScePafInit { // size is 0x18
|
typedef struct _ScePafInit { // size is 0x18
|
||||||
SceSize global_heap_size;
|
SceSize global_heap_size;
|
||||||
int a2;
|
int a2;
|
||||||
int a3;
|
int a3;
|
||||||
int cdlg_mode;
|
int cdlg_mode;
|
||||||
int heap_opt_param1;
|
int heap_opt_param1;
|
||||||
int heap_opt_param2;
|
int heap_opt_param2;
|
||||||
} ScePafInit;
|
} ScePafInit;
|
||||||
|
|
||||||
extern "C" int module_start(SceSize args, void *argp) {
|
extern "C" int module_start(SceSize args, void* argp)
|
||||||
int load_res;
|
{
|
||||||
ScePafInit init_param;
|
int load_res;
|
||||||
SceSysmoduleOpt sysmodule_opt;
|
ScePafInit init_param;
|
||||||
|
SceSysmoduleOpt sysmodule_opt;
|
||||||
|
|
||||||
init_param.global_heap_size = 0x1000000;
|
init_param.global_heap_size = 0x1000000;
|
||||||
init_param.a2 = 0xEA60;
|
init_param.a2 = 0xEA60;
|
||||||
init_param.a3 = 0x40000;
|
init_param.a3 = 0x40000;
|
||||||
init_param.cdlg_mode = 0;
|
init_param.cdlg_mode = 0;
|
||||||
init_param.heap_opt_param1 = 0;
|
init_param.heap_opt_param1 = 0;
|
||||||
init_param.heap_opt_param2 = 0;
|
init_param.heap_opt_param2 = 0;
|
||||||
|
|
||||||
load_res = 0xDEADBEEF;
|
load_res = 0xDEADBEEF;
|
||||||
sysmodule_opt.flags = 0;
|
sysmodule_opt.flags = 0;
|
||||||
sysmodule_opt.result = &load_res;
|
sysmodule_opt.result = &load_res;
|
||||||
|
|
||||||
int res = sceSysmoduleLoadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, sizeof(init_param), &init_param, &sysmodule_opt);
|
int res = sceSysmoduleLoadModuleInternalWithArg(
|
||||||
if((res | load_res) != 0){
|
SCE_SYSMODULE_INTERNAL_PAF,
|
||||||
sceClibPrintf("[PAF PRX Loader] Failed to load the PAF prx. (return value 0x%x, result code 0x%x )\n", res, load_res);
|
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() {
|
extern "C" void _start()
|
||||||
module_start(0, nullptr);
|
{
|
||||||
|
module_start(0, nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,42 +1,41 @@
|
|||||||
#include <psp2/kernel/clib.h>
|
|
||||||
|
|
||||||
#include <paf.h>
|
#include <paf.h>
|
||||||
|
#include <psp2/kernel/clib.h>
|
||||||
|
|
||||||
paf::Framework* g_fw;
|
paf::Framework* g_fw;
|
||||||
paf::ui::Scene* g_rootPage;
|
paf::ui::Scene* g_rootPage;
|
||||||
|
|
||||||
|
void loadPluginCB(paf::Plugin* plugin)
|
||||||
void loadPluginCB(paf::Plugin *plugin){
|
{
|
||||||
paf::Plugin::PageOpenParam pageOpenParam;
|
paf::Plugin::PageOpenParam pageOpenParam;
|
||||||
pageOpenParam.option = paf::Plugin::PageOption_None;
|
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;
|
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");
|
pText->SetString(L"Test Text");
|
||||||
}
|
}
|
||||||
|
|
||||||
int paf_main(void){
|
int paf_main(void)
|
||||||
|
{
|
||||||
paf::Framework::InitParam fwParam;
|
paf::Framework::InitParam fwParam;
|
||||||
fwParam.mode = paf::Framework::Mode_Normal;
|
fwParam.mode = paf::Framework::Mode_Normal;
|
||||||
|
|
||||||
paf::Framework *paf_fw = new paf::Framework(fwParam);
|
paf::Framework* paf_fw = new paf::Framework(fwParam);
|
||||||
if(paf_fw != NULL){
|
if (paf_fw != NULL) {
|
||||||
g_fw = paf_fw;
|
g_fw = paf_fw;
|
||||||
|
|
||||||
paf_fw->LoadCommonResourceSync();
|
paf_fw->LoadCommonResourceSync();
|
||||||
|
|
||||||
paf::Plugin::InitParam pluginParam;
|
paf::Plugin::InitParam pluginParam;
|
||||||
|
|
||||||
pluginParam.name = "config_plugin";
|
pluginParam.name = "config_plugin";
|
||||||
pluginParam.caller_name = "__main__";
|
pluginParam.caller_name = "__main__";
|
||||||
pluginParam.resource_file = "app0:/config_plugin.rco";
|
pluginParam.resource_file = "app0:/config_plugin.rco";
|
||||||
pluginParam.init_func = NULL;
|
pluginParam.init_func = NULL;
|
||||||
pluginParam.start_func = loadPluginCB;
|
pluginParam.start_func = loadPluginCB;
|
||||||
pluginParam.stop_func = NULL;
|
pluginParam.stop_func = NULL;
|
||||||
pluginParam.exit_func = NULL;
|
pluginParam.exit_func = NULL;
|
||||||
|
|
||||||
paf::Plugin::LoadSync(pluginParam);
|
paf::Plugin::LoadSync(pluginParam);
|
||||||
paf_fw->Run();
|
paf_fw->Run();
|
||||||
|
|||||||
@ -1581,8 +1581,8 @@ void GXMRenderer::Flip()
|
|||||||
void GXMRenderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, const SDL_Rect& dstRect, FColor color)
|
void GXMRenderer::Draw2DImage(Uint32 textureId, const SDL_Rect& srcRect, const SDL_Rect& dstRect, FColor color)
|
||||||
{
|
{
|
||||||
this->StartScene();
|
this->StartScene();
|
||||||
if(!this->cleared) {
|
if (!this->cleared) {
|
||||||
gxm->clear(0,0,0, false);
|
gxm->clear(0, 0, 0, false);
|
||||||
this->cleared = true;
|
this->cleared = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,8 +40,8 @@ struct Direct3DRMDevice2Impl : public Direct3DRMObjectBaseImpl<IDirect3DRMDevice
|
|||||||
private:
|
private:
|
||||||
void Resize();
|
void Resize();
|
||||||
|
|
||||||
int32_t m_windowWidth;
|
int m_windowWidth;
|
||||||
int32_t m_windowHeight;
|
int m_windowHeight;
|
||||||
uint32_t m_virtualWidth;
|
uint32_t m_virtualWidth;
|
||||||
uint32_t m_virtualHeight;
|
uint32_t m_virtualHeight;
|
||||||
ViewportTransform m_viewportTransform;
|
ViewportTransform m_viewportTransform;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user