Skip to content

Commit 8b25a88

Browse files
authored
Various fixes mainly for WebAssembly and Android targets. (#182)
The DevUI now comes with a set of pre-defined menu categories: File, Settings, Engine, Tools, Help Fixes: * Fixed crash during AIO port cleanup (uninitialized-variable). * Fixed 'main' thread to spin uncontrolled and impacting performance. * Fixed various build issues on Emscripten targets (clang) * Fixed Android example using old timer API.
1 parent dd26ca9 commit 8b25a88

File tree

13 files changed

+27
-11
lines changed

13 files changed

+27
-11
lines changed

source/code/core/utils/private/native_aio.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ namespace ice::native_aio
503503
ice::ucount num_completed = 0;
504504
while(limits.events_max > num_completed)
505505
{
506-
ice::native_aio::AIORequest const* request;
506+
ice::native_aio::AIORequest const* request = nullptr;
507507

508508
// TODO: Allow different requests
509509
bool const iocompleted = aio_file_await_request(port, limits, request, bytes);

source/code/core/utils/public/ice/shard_payloads.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ namespace ice
1010
{
1111

1212
template<>
13-
constexpr ice::ShardPayloadID Constant_ShardPayloadID<ice::String const*> = ice::shard_payloadid("ice::String const*");
13+
constexpr inline ice::ShardPayloadID Constant_ShardPayloadID<ice::String const*> = ice::shard_payloadid("ice::String const*");
1414

1515
template<>
16-
constexpr ice::ShardPayloadID Constant_ShardPayloadID<ice::Tns> = ice::shard_payloadid("ice::Tns");
16+
constexpr inline ice::ShardPayloadID Constant_ShardPayloadID<ice::Tns> = ice::shard_payloadid("ice::Tns");
1717

1818
} // namespace ice

source/code/example/android/simple/private/example_android.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct TestTrait : public ice::Trait
5454

5555
auto activate(ice::WorldStateParams const& update) noexcept -> ice::Task<> override
5656
{
57-
timer = ice::timer::create_timer(update.clock, 1.0f);
57+
timer = ice::timer::create_timer(update.clock, 1_Ts);
5858
co_return;
5959
}
6060

source/code/iceshard/engine/private/world_trait.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace ice
3838

3939
void Trait::send(ice::ShardID shardid) noexcept
4040
{
41-
_context.send({ shardid });
41+
_context.send({ ice::Shard{ shardid } });
4242
}
4343

4444
void Trait::send(ice::ShardID shardid, ice::Asset asset) noexcept

source/code/iceshard/engine/public/ice/engine_runner.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ namespace ice
6565
} // namespace ice
6666

6767
template<>
68-
inline constexpr ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::EngineFrameUpdate const*> = ice::shard_payloadid("ice::EngineFrameUpdate const*");
68+
constexpr inline ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::EngineFrameUpdate const*> = ice::shard_payloadid("ice::EngineFrameUpdate const*");

source/code/iceshard/engine/public/ice/gfx/gfx_shards.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace ice::gfx
3434
} // namespace ice::gfx
3535

3636
template<>
37-
inline constexpr ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::gfx::GfxFrameUpdate const*> = ice::shard_payloadid("ice::gfx::GfxFrameUpdate const*");
37+
constexpr inline ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::gfx::GfxFrameUpdate const*> = ice::shard_payloadid("ice::gfx::GfxFrameUpdate const*");
3838

3939
template<>
40-
inline constexpr ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::gfx::GfxStateChange const*> = ice::shard_payloadid("ice::gfx::GfxStateChange const*");
40+
constexpr inline ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::gfx::GfxStateChange const*> = ice::shard_payloadid("ice::gfx::GfxStateChange const*");

source/code/iceshard/engine/public/ice/world/world_trait_details.hxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#pragma once
55
#include <ice/world/world_trait_types.hxx>
66
#include <ice/assert.hxx>
7+
#include <ice/task.hxx>
78

89
namespace ice::detail
910
{

source/code/iceshard/engine/public/ice/world/world_updater.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ namespace ice
3737
} // namespace ice
3838

3939
template<>
40-
inline constexpr ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::WorldStateParams const*> = ice::shard_payloadid("ice::WorldStateParams const*");
40+
constexpr inline ice::ShardPayloadID ice::Constant_ShardPayloadID<ice::WorldStateParams const*> = ice::shard_payloadid("ice::WorldStateParams const*");

source/code/iceshard/iceshard/private/iceshard_trait_context.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace ice
4242
IceshardTraitContext(ice::IceshardWorldContext& world_context, ice::u32 index) noexcept;
4343
~IceshardTraitContext() noexcept;
4444

45-
void send(ice::detail::TraitEvent event) noexcept;
45+
void send(ice::detail::TraitEvent event) noexcept override;
4646
void sync(ice::ShardContainer& out_shards) noexcept;
4747

4848
auto checkpoint(ice::StringID id) noexcept -> ice::TaskCheckpointGate override;

source/code/iceshard/iceshard/private/iceshard_world_manager_devui.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ namespace ice
4242

4343
ice::array::resize(_entries, ice::hashmap::count(_manager._worlds));
4444

45+
[[maybe_unused]]
4546
ImVec2 const avail = ImGui::GetContentRegionAvail();
4647
if (ImGui::BeginTable("##details", 2))
4748
{

0 commit comments

Comments
 (0)