Skip to content

Commit

Permalink
Bump vcpkg committish
Browse files Browse the repository at this point in the history
  • Loading branch information
complexlogic committed Dec 3, 2023
1 parent c0ad194 commit e548750
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
submodules: true

- uses: friendlyanon/setup-vcpkg@v1
with: { committish: 0ccb3d11406922bef1dcc29002f68f633a321f19 }
with: { committish: 16ee2ecb31788c336ace8bb14c21801efb6836e4 }

- name: Configure
run: cmake -B build -G "${{env.CMAKE_GENERATOR}}" -D "CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TRIPLET}}
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ if (WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE") # Workaround for Nanosvg and SDL_image header conflicts
endif ()

option(EXTRA_WARNINGS "Enable extra compiler warnings" OFF)
if (EXTRA_WARNINGS)
if (MSVC)
add_compile_options(/W4 /WX)
else ()
add_compile_options(-Wall -Wextra -Wpedantic -Wconversion)
endif ()
endif ()

# Find dependencies
if (UNIX)
find_package(PkgConfig MODULE REQUIRED)
Expand Down
11 changes: 1 addition & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@ Ticks ticks;
char *executable_dir;
std::string log_path;

State state = { false };

Display::Display()
{
renderer = nullptr;
window = nullptr;
width = 0;
height = 0;
}
State state;

void Display::init()
{
Expand Down Expand Up @@ -346,7 +338,6 @@ void Gamepad::add_control(const char *label, const char *cmd)

void Gamepad::poll()
{
Controller &controller = controllers.front();
// Poll sticks
if (!sticks.empty()) {
AxisType axis_type;
Expand Down
13 changes: 6 additions & 7 deletions src/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,16 @@

class Display {
public:
SDL_Renderer *renderer;
SDL_Window *window;
SDL_Renderer *renderer = nullptr;
SDL_Window *window = nullptr;
SDL_DisplayMode dm;
SDL_RendererInfo ri;
#ifdef _WIN32
SDL_SysWMinfo wm_info;
#endif
int width;
int height;
int width = 0;
int height = 0;

Display();
void init();
void create_window();
void close();
Expand Down Expand Up @@ -145,8 +144,8 @@ struct Ticks {


struct State {
bool application_launching;
bool application_running;
bool application_launching = false;
bool application_running = false;
};


Expand Down
2 changes: 1 addition & 1 deletion src/platform/unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool start_process(const std::string &command, bool application)

// Check to see if the shell successfully launched
SDL_Delay(50);
pid_t pid = waitpid(child_pid, &status, WNOHANG);
waitpid(child_pid, &status, WNOHANG);
if (WIFEXITED(status) && WEXITSTATUS(status) > 126)
return false;
break;
Expand Down

0 comments on commit e548750

Please sign in to comment.