Skip to content

Commit

Permalink
the cummit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapilarny committed Sep 7, 2024
1 parent 040ac14 commit 7f6226f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/events/event.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "event.h"

#include "utils/logger.h"

void EventTransmitter::Init() {
instance = std::make_unique<EventTransmitter>();
}
Expand Down
4 changes: 3 additions & 1 deletion src/exports/JAPIEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ struct HWNDCallbackEvent {
};

// "ImGUIRenderEvent"
struct ImGUIRenderEvent { /* No data */ };
struct ImGUIRenderEvent {
/* No Data */
};

#endif //JAPIEVENTS_H
6 changes: 4 additions & 2 deletions src/exports/JojoAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ __int64 JAPI_FindSignature(const char* signature) {
}

void JAPI_RegisterEventCallback(std::string eventName, EventCallback callback) {
EventTransmitter::RegisterCallback(std::move(eventName), callback);
EventTransmitter::RegisterCallback(eventName, callback);
}

void JAPI_PatchASBRMem(void* address, void* data, size_t size) {
Expand All @@ -58,7 +58,7 @@ void JAPI_CopyMem(void* dest, void* src, size_t size) {
}

std::string JAPI_GetPluginReservedDir() {
return "japi\\dll-plugins" + std::string(GetModGUID(__builtin_extract_return_addr(__builtin_return_address(0))));
return "japi\\dll-plugins\\" + std::string(GetModGUID(__builtin_extract_return_addr(__builtin_return_address(0))));
}

// void JAPI_ExecuteASMCode(std::string code) {
Expand Down Expand Up @@ -181,6 +181,8 @@ bool JAPI_ConfigRegisterInt(int* value, std::string key, int defaultValue) {
auto guid = GetModGUID(__builtin_extract_return_addr(__builtin_return_address(0)));
ModConfig config = GetModConfig(guid);

ConfigRegister(config.table, value, key, defaultValue);

// Save the config
SaveConfig(config);

Expand Down
2 changes: 1 addition & 1 deletion src/japi.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class JAPI {
static std::string GetModGUID(HANDLE modHandle);
static GameData& GetGameData();

static std::string GetJAPIVersionString() { return "3.0.1"; }
static std::string GetJAPIVersionString() { return "3.0.3"; }
static const std::vector<ModData>& GetMods() { return instance->mods; }
static std::unordered_map<std::string, RegisteredConfigData>& GetRegisteredDataMap() { return instance->mod_registered_data; }
static RegisteredConfigData GetConfigData(const std::string& guid) { return instance->mod_registered_data[guid]; }
Expand Down
3 changes: 2 additions & 1 deletion src/kiero/d3d11_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ void imgui_update() {
ImGui::EndTabBar();
}

EventTransmitter::TransmitEvent("ImGUIRenderEvent", nullptr);
ImGUIRenderEvent e{};
EventTransmitter::TransmitEvent("ImGUIRenderEvent", &e);

ImGui::End();

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.0.3

0 comments on commit 7f6226f

Please sign in to comment.