Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Oct 20, 2024
1 parent e232a38 commit 71484ac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: 'Create Build Environment'
run: |
sudo apt update -y
sudo apt install -y cmake curl g++ libgl1-mesa-dev libopenmpt-dev
sudo apt install -y cmake curl g++
- name: 'Configure CMake'
run: |
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: 'Create Build Environment'
run: |
sudo apt-get update -y
sudo apt-get install -y cmake curl g++ libgl1-mesa-dev libopenmpt-dev
sudo apt-get install -y cmake curl g++
- name: 'Configure CMake'
run: |
Expand Down
5 changes: 3 additions & 2 deletions Sources/Shared/Containers/StringView.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
// 2017, 2018, 2019, 2020, 2021, 2022, 2023
// 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024
// Vladimír Vondruš <[email protected]> and contributors
// Copyright © 2020-2024 Dan R.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -841,7 +842,7 @@ namespace Death { namespace Containers {
The returned instance has both @ref StringViewFlags::Global and @ref StringViewFlags::NullTerminated set.
*/
constexpr StringView operator"" _s(const char* data, std::size_t size) {
constexpr StringView operator""_s(const char* data, std::size_t size) {
// Using plain bit ops instead of EnumSet to speed up debug builds
return StringView{data, size, StringViewFlags(std::size_t(StringViewFlags::Global) | std::size_t(StringViewFlags::NullTerminated))};
}
Expand Down
12 changes: 6 additions & 6 deletions Sources/nCine/Graphics/IGfxDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace nCine
{
#if defined(DEATH_TARGET_EMSCRIPTEN)
EM_BOOL IGfxDevice::emscriptenHandleResize(int eventType, const EmscriptenUiEvent* event, void* userData)
bool IGfxDevice::emscriptenHandleResize(int eventType, const EmscriptenUiEvent* event, void* userData)
{
# if defined(DEATH_TRACE)
double cssWidth = 0.0;
Expand All @@ -37,10 +37,10 @@ namespace nCine
gfxDevice->setResolutionInternal(static_cast<int>(event->windowInnerWidth * pixelRatio), static_cast<int>(event->windowInnerHeight * pixelRatio));
#endif
}
return 1;
return true;
}

EM_BOOL IGfxDevice::emscriptenHandleFullscreen(int eventType, const EmscriptenFullscreenChangeEvent* event, void* userData)
bool IGfxDevice::emscriptenHandleFullscreen(int eventType, const EmscriptenFullscreenChangeEvent* event, void* userData)
{
# if defined(DEATH_TRACE)
double cssWidth = 0.0;
Expand All @@ -62,18 +62,18 @@ namespace nCine
#endif
}

return 1;
return true;
}

# if defined(WITH_GLFW)
EM_BOOL IGfxDevice::emscriptenHandleFocus(int eventType, const EmscriptenFocusEvent* event, void* userData)
bool IGfxDevice::emscriptenHandleFocus(int eventType, const EmscriptenFocusEvent* event, void* userData)
{
if (eventType == EMSCRIPTEN_EVENT_FOCUS) {
theApplication().SetFocus(true);
} else if (eventType == EMSCRIPTEN_EVENT_BLUR) {
theApplication().SetFocus(false);
}
return 1;
return true;
}
# endif
#endif
Expand Down
6 changes: 3 additions & 3 deletions Sources/nCine/Graphics/IGfxDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ namespace nCine
#endif

#if defined(DEATH_TARGET_EMSCRIPTEN)
static int emscriptenHandleResize(int eventType, const EmscriptenUiEvent* event, void* userData);
static int emscriptenHandleFullscreen(int eventType, const EmscriptenFullscreenChangeEvent* event, void* userData);
static bool emscriptenHandleResize(int eventType, const EmscriptenUiEvent* event, void* userData);
static bool emscriptenHandleFullscreen(int eventType, const EmscriptenFullscreenChangeEvent* event, void* userData);

# if defined(WITH_GLFW)
static int emscriptenHandleFocus(int eventType, const EmscriptenFocusEvent* event, void* userData);
static bool emscriptenHandleFocus(int eventType, const EmscriptenFocusEvent* event, void* userData);
# endif
#endif
};
Expand Down

0 comments on commit 71484ac

Please sign in to comment.