feat: Resolve low framerate during song select for IIDX32+
> caused by bad code around thumbnail fetching logic including file checks in every draw call, see #4 > added `hooks::wmisc` for linux specific minor performance fixes and similar
This commit is contained in:
+28
-1
@@ -1,11 +1,33 @@
|
||||
#include "develhook.h"
|
||||
#include "util/logging.h"
|
||||
#include "util/detour.h"
|
||||
#include "util/libutils.h"
|
||||
#include "avs/core.h"
|
||||
#include "avs/game.h"
|
||||
#include "hooks/wmischook.h"
|
||||
#include "external/stackwalker/stackwalker.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
namespace hooks::devel::thumbnail
|
||||
{
|
||||
typedef int (*BmswSymlink_t)(const char *srcwpath, const char *dstwpath, int canonic);
|
||||
static BmswSymlink_t BmswSymlink;
|
||||
|
||||
void run()
|
||||
{
|
||||
HMODULE bmsw_ = nullptr;
|
||||
if ((bmsw_ = libutils::try_library(MODULE_PATH / "bmsound-wine.dll")))
|
||||
{
|
||||
BmswSymlink = (BmswSymlink_t) GetProcAddress(bmsw_, "BmswSymlink");
|
||||
}
|
||||
|
||||
log_warning("hooks::devel::thumbnail", "Forcing thumbnail patch..");
|
||||
hooks::wmisc::apply_performance_hacks(avs::game::DLL_INSTANCE, "LDJ", "20250825");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace hooks::devel::avs_fs
|
||||
{
|
||||
@@ -49,7 +71,9 @@ void run()
|
||||
namespace hooks::devel
|
||||
{
|
||||
void (*routine_cb_[devel_routine_last])() ={
|
||||
[avs_fs_detour] = avs_fs::run
|
||||
[avs_fs_detour] = avs_fs::run,
|
||||
[sndb_test] = nullptr,
|
||||
[thum_test] = thumbnail::run
|
||||
};
|
||||
|
||||
static constexpr unsigned int by_str(const char *str, int h = 0)
|
||||
@@ -85,6 +109,9 @@ static devel_routine_t routines()
|
||||
case by_str("sndb_test"):
|
||||
routines_ |= 1 << sndb_test;
|
||||
break;
|
||||
case by_str("thum_test"):
|
||||
routines_ |= 1 << thum_test;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user