mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
fix Windows build
This commit is contained in:
parent
b7e721c465
commit
53e0b63972
4 changed files with 8 additions and 5 deletions
|
@ -18,8 +18,8 @@ WARN := -Wall -Wextra -Werror \
|
||||||
-Wno-narrowing \
|
-Wno-narrowing \
|
||||||
-Wno-missing-field-initializers
|
-Wno-missing-field-initializers
|
||||||
|
|
||||||
CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -DENABLE_OPENGL -m32
|
CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -m32
|
||||||
CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -DENABLE_OPENGL -m32
|
CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -DENABLE_OPENGL -DSPDLOG_ACTIVE_LEVEL=0 -m32
|
||||||
CPPFLAGS := -MMD
|
CPPFLAGS := -MMD
|
||||||
|
|
||||||
ifneq ($(DEBUG),0)
|
ifneq ($(DEBUG),0)
|
||||||
|
|
|
@ -986,7 +986,7 @@ std::map<std::pair<float, float>, uint16_t> gfx_d3d11_get_pixel_depth(int fb_id,
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
ImTextureID gfx_d3d11_get_texture_by_id(int id) {
|
ImTextureID gfx_d3d11_get_texture_by_id(int id) {
|
||||||
return impl.backend == Backend::DX11 ? d3d.textures[id].resource_view.Get() : reinterpret_cast<ImTextureID>(id);
|
return d3d.textures[id].resource_view.Get();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GfxRenderingAPI gfx_direct3d11_api = {
|
struct GfxRenderingAPI gfx_direct3d11_api = {
|
||||||
|
|
|
@ -146,7 +146,7 @@ namespace Ship {
|
||||||
ToLoad->resource = Res;
|
ToLoad->resource = Res;
|
||||||
ResourceCache[Res->file->path] = Res;
|
ResourceCache[Res->file->path] = Res;
|
||||||
|
|
||||||
SPDLOG_DEBUG("Loaded Resource {} on ResourceMgr thread", ToLoad->File->path);
|
SPDLOG_DEBUG("Loaded Resource {} on ResourceMgr thread", ToLoad->file->path);
|
||||||
|
|
||||||
// Disabled for now because it can cause random crashes
|
// Disabled for now because it can cause random crashes
|
||||||
//FileCache[Res->File->path] = nullptr;
|
//FileCache[Res->File->path] = nullptr;
|
||||||
|
|
|
@ -895,8 +895,11 @@ namespace SohImGui {
|
||||||
|
|
||||||
ImTextureID GetTextureByID(int id) {
|
ImTextureID GetTextureByID(int id) {
|
||||||
#ifdef ENABLE_DX11
|
#ifdef ENABLE_DX11
|
||||||
|
if (impl.backend == Backend::DX11)
|
||||||
|
{
|
||||||
ImTextureID gfx_d3d11_get_texture_by_id(int id);
|
ImTextureID gfx_d3d11_get_texture_by_id(int id);
|
||||||
return gfx_d3d11_get_texture_by_id(id);
|
return gfx_d3d11_get_texture_by_id(id);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
return reinterpret_cast<ImTextureID>(id);
|
return reinterpret_cast<ImTextureID>(id);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue