diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bd2450a..5987aa3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -523,18 +523,8 @@ if (ISLE_BUILD_APP) if(NINTENDO_3DS) target_sources(isle PRIVATE ISLE/3ds/apthooks.cpp - ISLE/3ds/filesystem.cpp + ISLE/3ds/config.cpp ) - ctr_generate_smdh(isle.smdh - NAME "LEGO Island" - TITLE "LEGO Island" - DESCRIPTION "LEGO Island for the Nintendo 3DS" - AUTHOR "isledecomp/isle-portable" - VERSION "${PROJECT_VERSION}" - ICON "ISLE/res/3ds/isle.png" - ) - - ctr_create_3dsx(isle SMDH isle.smdh) endif() endif() @@ -661,6 +651,18 @@ endif() set(CPACK_PACKAGE_DIRECTORY "dist") set(CPACK_PACKAGE_FILE_NAME "isle-${PROJECT_VERSION}-${ISLE_PACKAGE_NAME}-${CMAKE_SYSTEM_PROCESSOR}") +if(NINTENDO_3DS) + ctr_generate_smdh(isle.smdh + NAME "LEGO Island" + TITLE "LEGO Island" + DESCRIPTION "LEGO Island for the Nintendo 3DS" + AUTHOR "isledecomp/isle-portable" + VERSION "${PROJECT_VERSION}" + ICON "ISLE/res/3ds/isle.png" + ) + + ctr_create_3dsx(isle SMDH isle.smdh) +endif() if(MSVC) set(CPACK_GENERATOR ZIP) else() diff --git a/ISLE/3ds/filesystem.cpp b/ISLE/3ds/config.cpp similarity index 69% rename from ISLE/3ds/filesystem.cpp rename to ISLE/3ds/config.cpp index ff452d8a..dc5dd8dc 100644 --- a/ISLE/3ds/filesystem.cpp +++ b/ISLE/3ds/config.cpp @@ -1,4 +1,4 @@ -#include "filesystem.h" +#include "config.h" #include #include @@ -17,15 +17,6 @@ void N3DS_SetupDefaultConfigOverrides(dictionary* p_dictionary) // Extra / at the end causes some issues iniparser_set(p_dictionary, "isle:savepath", "sdmc:/3ds/isle"); - // We are currently just rendering to the touch screen - iniparser_set(p_dictionary, "isle:Full Screen", "true"); - - // Wide view angle takes more resources - iniparser_set(p_dictionary, "isle:Wide View Angle", "false"); - - // Set back buffers in video RAM - iniparser_set(p_dictionary, "isle:Back Buffers in Video RAM", "1"); - // Use e_noAnimation/cut transition iniparser_set(p_dictionary, "isle:Transition Type", "1"); } diff --git a/ISLE/3ds/filesystem.h b/ISLE/3ds/config.h similarity index 53% rename from ISLE/3ds/filesystem.h rename to ISLE/3ds/config.h index 699fd52b..64d3a1b0 100644 --- a/ISLE/3ds/filesystem.h +++ b/ISLE/3ds/config.h @@ -1,8 +1,8 @@ -#ifndef N3DS_FILESYSTEM_H -#define N3DS_FILESYSTEM_H +#ifndef N3DS_CONFIG_H +#define N3DS_CONFIG_H #include "dictionary.h" void N3DS_SetupDefaultConfigOverrides(dictionary* p_dictionary); -#endif // N3DS_FILESYSTEM_H +#endif // N3DS_CONFIG_H diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 3369e74a..3618c775 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -52,7 +52,7 @@ #ifdef __3DS__ #include "3ds/apthooks.h" -#include "3ds/filesystem.h" +#include "3ds/config.h" #endif DECOMP_SIZE_ASSERT(IsleApp, 0x8c) diff --git a/miniwin/CMakeLists.txt b/miniwin/CMakeLists.txt index 2ae23653..f76db153 100644 --- a/miniwin/CMakeLists.txt +++ b/miniwin/CMakeLists.txt @@ -58,11 +58,9 @@ if(NINTENDO_3DS) else() find_library(CITRO3D_LIBRARY NAMES citro3d) endif() - find_library(CTRU_LIBRARY NAMES ctru) - if(CTRU_LIBRARY AND CITRO3D_LIBRARY) - message(STATUS "Found libctru and citro3d: enabling Citro3D renderer") + if(CITRO3D_LIBRARY) + message(STATUS "Found citro3d: enabling Citro3D renderer") target_sources(miniwin PRIVATE src/d3drm/backends/citro3d/renderer.cpp) - target_compile_definitions(miniwin PRIVATE USE_CITRO3D) ctr_add_shader_library(vshader src/d3drm/backends/citro3d/vshader.v.pica) dkp_add_embedded_binary_library(3ds_shaders vshader) target_link_libraries(miniwin PRIVATE ${CITRO3D_LIBRARY} 3ds_shaders) diff --git a/miniwin/src/d3drm/d3drm.cpp b/miniwin/src/d3drm/d3drm.cpp index 0ae75caa..45a4e3ad 100644 --- a/miniwin/src/d3drm/d3drm.cpp +++ b/miniwin/src/d3drm/d3drm.cpp @@ -13,7 +13,7 @@ #ifdef USE_OPENGLES2 #include "d3drmrenderer_opengles2.h" #endif -#ifdef USE_CITRO3D +#ifdef __3DS__ #include "d3drmrenderer_citro3d.h" #endif #ifdef _WIN32 @@ -162,7 +162,7 @@ HRESULT Direct3DRMImpl::CreateDeviceFromSurface( DDRenderer = OpenGL1Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight); } #endif -#ifdef USE_CITRO3D +#ifdef __3DS__ else if (SDL_memcmp(&guid, &Citro3D_GUID, sizeof(GUID)) == 0) { DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight); } diff --git a/miniwin/src/d3drm/d3drmdevice.cpp b/miniwin/src/d3drm/d3drmdevice.cpp index b1ae249b..b738c809 100644 --- a/miniwin/src/d3drm/d3drmdevice.cpp +++ b/miniwin/src/d3drm/d3drmdevice.cpp @@ -155,7 +155,7 @@ void Direct3DRMDevice2Impl::Resize() { int width, height; SDL_GetWindowSizeInPixels(DDWindow, &width, &height); -#ifdef USE_CITRO3D +#ifdef __3DS__ width = 320; // We are on the lower screen height = 240; #endif diff --git a/miniwin/src/ddraw/ddraw.cpp b/miniwin/src/ddraw/ddraw.cpp index 3dfcd866..0410d355 100644 --- a/miniwin/src/ddraw/ddraw.cpp +++ b/miniwin/src/ddraw/ddraw.cpp @@ -4,7 +4,7 @@ #ifdef USE_OPENGLES2 #include "d3drmrenderer_opengles2.h" #endif -#ifdef USE_CITRO3D +#ifdef __3DS__ #include "d3drmrenderer_citro3d.h" #endif #ifdef _WIN32 @@ -231,7 +231,7 @@ HRESULT DirectDrawImpl::EnumDevices(LPD3DENUMDEVICESCALLBACK cb, void* ctx) #ifdef USE_OPENGL1 OpenGL1Renderer_EnumDevice(cb, ctx); #endif -#ifdef USE_CITRO3D +#ifdef __3DS__ Citro3DRenderer_EnumDevice(cb, ctx); #endif #ifdef _WIN32 @@ -348,7 +348,7 @@ HRESULT DirectDrawImpl::CreateDevice( DDRenderer = OpenGL1Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight); } #endif -#ifdef USE_CITRO3D +#ifdef __3DS__ else if (SDL_memcmp(&guid, &Citro3D_GUID, sizeof(GUID)) == 0) { DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight); }