Skip to content

Commit

Permalink
Fixed windows issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritoDv committed Jan 31, 2024
1 parent 39fcdc8 commit dadf741
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project(torch)
include(FetchContent)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_C_STANDARD 11)

# Link libgfxd
# Because libgfxd is not a CMake project, we have to manually fetch it and add it to the build
Expand Down Expand Up @@ -55,13 +56,13 @@ else()
$<$<CONFIG:Debug>:
/w;
/Od;
/MTd
/MDd
>
$<$<CONFIG:Release>:
/Oi;
/Gy;
/W3;
/MT
/MD
>
/permissive-;
/MP;
Expand All @@ -72,13 +73,13 @@ else()
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
target_compile_options(${PROJECT_NAME} PRIVATE
$<$<CONFIG:Debug>:
/MTd
/MDd
>
$<$<CONFIG:Release>:
/O2;
/Oi;
/Gy;
/MT
/MD
>
/permissive-;
/MP;
Expand All @@ -100,7 +101,7 @@ else()
>
/MANIFEST:NO;
/DEBUG;
/SUBSYSTEM:WINDOWS
/SUBSYSTEM:CONSOLE
)
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
target_link_options(${PROJECT_NAME} PRIVATE
Expand All @@ -115,7 +116,7 @@ else()
>
/MANIFEST:NO;
/DEBUG;
/SUBSYSTEM:WINDOWS
/SUBSYSTEM:CONSOLE
)
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/factories/sm64/GeoLayoutFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ std::optional<std::shared_ptr<IParsedData>> SM64::GeoLayoutFactory::parse(std::v
}
}

commands.push_back({opcode, arguments});
commands.push_back({ opcode, arguments });
}

return std::make_shared<GeoLayout>(commands);
Expand Down
2 changes: 1 addition & 1 deletion src/factories/sm64/geo/GeoCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ inline std::ostream& operator<<(std::ostream& out, const GeoOpcode& opcode) {
BSWAP32((*(s32 *) &cmd[CMD_PROCESS_OFFSET(offset)]))

#define cur_geo_cmd_u32(offset) \
BSWAP32((*(uint32_t *) &cmd[CMD_PROCESS_OFFSET(offset)]))
(uint32_t) BSWAP32((*(uint32_t *) &cmd[CMD_PROCESS_OFFSET(offset)]))

class GeoLayoutCommand {
public:
Expand Down
1 change: 1 addition & 0 deletions src/utils/TorchUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>

namespace Torch {
template< typename T >
Expand Down

0 comments on commit dadf741

Please sign in to comment.