Skip to content

Commit

Permalink
Changed CFLAGS and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Northfear committed Apr 14, 2021
1 parent b055076 commit 42e5a43
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ endif()

if(VITA)
add_definitions(-DVITA)
set(VITA_FLAGS "-Ofast -mcpu=cortex-a9 -mfpu=neon -fgraphite-identity -floop-nest-optimize -fno-lto -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
set(VITA_FLAGS "-O2 -mcpu=cortex-a9 -mfpu=neon -ffast-math -ftree-vectorize -fno-lto -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VITA_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VITA_FLAGS}")
list(APPEND VANILLA_LIBS "-lSceMotion_stub -lSceTouch_stub -lSceAudio_stub -lSceAudioIn_stub -lSceCtrl_stub -lSceGxm_stub \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Check Vanilla Conquer Wiki for more info about required folder/file structure an
### Build
```
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake -DVITA=true -DCMAKE_BUILD_TYPE=Release
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake -DVITA=true -DCMAKE_BUILD_TYPE=None
make
```

Expand Down
5 changes: 3 additions & 2 deletions common/paths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ void PathsClass::Init(const char* suffix, const char* ini_name, const char* data
Program_Path();
Data_Path();
User_Path();

//crashes on Vita after DBG_INFO in DEBUG build for some reason
#ifndef VITA
DBG_INFO("Searching the following paths for path config data:\n argv: '%s'\n binary: '%s'\n default data: "
"'%s'\n default user: '%s'",
argv_path.c_str(),
ProgramPath.c_str(),
DataPath.c_str(),
UserPath.c_str());

#endif
// Check for a config file to load paths from.
RawFileClass file;
bool use_argv_path = false;
Expand Down
2 changes: 2 additions & 0 deletions redalert/scroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ void ScrollClass::AI(KeyNumType& input, int x, int y)
int scrollDistance = (7 - Options.ScrollRate) * 20;
Scroll_Map((DirType)scrollDirection, scrollDistance, true);
}
// scroll only with analog sticks for now
noscroll = true;
#endif

if (!noscroll) {
Expand Down
2 changes: 2 additions & 0 deletions tiberiandawn/scroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ void ScrollClass::AI(KeyNumType& input, int x, int y)
int scrollDistance = (7 - Options.ScrollRate) * 20;
Scroll_Map((DirType)scrollDirection, scrollDistance, true);
}
// scroll only with analog sticks for now
noscroll = true;
#endif

if (!noscroll) {
Expand Down

0 comments on commit 42e5a43

Please sign in to comment.