Apply suggestions from code review

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
This commit is contained in:
Joshua Peisach 2025-06-16 14:51:22 -04:00
parent b1dfa61c38
commit 3e5d447f9b
No known key found for this signature in database
GPG Key ID: 41C3D4189AFEDB5A
4 changed files with 7 additions and 14 deletions

View File

@ -643,9 +643,7 @@ endif()
set(CPACK_PACKAGE_DIRECTORY "dist")
set(CPACK_PACKAGE_FILE_NAME "isle-${PROJECT_VERSION}-${ISLE_PACKAGE_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
if(MSVC)
set(CPACK_GENERATOR ZIP)
elseif(NINTENDO_3DS)
if(NINTENDO_3DS)
include(Tools3DS)
set(APP_TITLE "LEGO Island")
set(APP_DESCRIPTION "LEGO Island port for 3DS")
@ -654,6 +652,10 @@ elseif(NINTENDO_3DS)
set(APP_VERSION ${PROJECT_VERSION})
add_3dsx_target(isle)
endif()
if(MSVC)
set(CPACK_GENERATOR ZIP)
else()
set(CPACK_GENERATOR TGZ)
endif()

View File

@ -102,11 +102,7 @@ inline Result MeshDeepClone(MeshImpl::MeshData* pSource, MeshImpl::MeshData*& rp
assert(Succeeded(result));
#if defined(__3DS__)
unsigned long* faceBuffer = new unsigned long[dataSize];
#else
unsigned int* faceBuffer = new unsigned int[dataSize];
#endif
DWORD* faceBuffer = new DWORD[dataSize];
result =
ResultVal(pSource->groupMesh->GetGroup(pSource->groupIndex, &vcount, &fcount, &vperface, &dataSize, faceBuffer)
);

View File

@ -63,11 +63,7 @@ inline Result CreateMesh(
int count = faceCount * 3;
int index = 0;
#if defined(__3DS__)
unsigned long* fData = new unsigned long[count];
#else
unsigned int* fData = new unsigned int[count];
#endif
DWORD* fData = new DWORD[count];
D3DRMVERTEX* vertices = new D3DRMVERTEX[vertexCount];
memset(vertices, 0, sizeof(*vertices) * vertexCount);

View File

@ -192,7 +192,6 @@ Direct3DRMRenderer* Direct3DRMSDL3GPURenderer::Create(DWORD width, DWORD height)
)};
if (!device.ptr) {
SDL_LogError(LOG_CATEGORY_MINIWIN, "SDL_CreateGPUDevice failed (%s)", SDL_GetError());
SDL_Log("width: %d height: %d", width, height);
return nullptr;
}