Skip to content

Commit

Permalink
Try to fix pointer bug again
Browse files Browse the repository at this point in the history
  • Loading branch information
HACKERALERT committed May 7, 2022
1 parent e64a8b4 commit 81c09b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DrawCommandWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void iggDrawCommandGetClipRect(IggDrawCmd handle, IggVec4 *rect)
void iggDrawCommandGetTextureID(IggDrawCmd handle, IggTextureID *id)
{
ImDrawCmd *cmd = reinterpret_cast<ImDrawCmd *>(handle);
*id = cmd->GetTexID();
*id = reinterpret_cast<IggTextureID>(cmd->TextureId);
}

IggBool iggDrawCommandHasUserCallback(IggDrawCmd handle)
Expand Down
2 changes: 1 addition & 1 deletion FontAtlasWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void iggFontAtlasGetTexDataAsRGBA32(IggFontAtlas handle, unsigned char **pixels,
void iggFontAtlasSetTextureID(IggFontAtlas handle, IggTextureID id)
{
ImFontAtlas *fontAtlas = reinterpret_cast<ImFontAtlas *>(handle);
fontAtlas->SetTexID(id);
fontAtlas->SetTexID(reinterpret_cast<ImTextureID>(id));
}

void iggFontAtlasBuild(IggFontAtlas handle)
Expand Down
4 changes: 3 additions & 1 deletion imguiWrapperTypes.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#pragma once

#include <stdint.h>

#ifdef __cplusplus
extern "C"
{
#endif

typedef int IggBool;
typedef float IggFloat;
typedef void *IggTextureID;
typedef uintptr_t IggTextureID;

typedef void *IggContext;
typedef void *IggDrawCmd;
Expand Down

0 comments on commit 81c09b6

Please sign in to comment.