Skip to content

Commit

Permalink
Add new setting, update FAQ, misc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
axstin committed Aug 8, 2019
1 parent 772632b commit 5f0419a
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 17 deletions.
19 changes: 18 additions & 1 deletion README.md
Expand Up @@ -7,10 +7,27 @@
## FAQ

1. **Some files are being deleted and/or my anti-virus is detecting rbxfpsunlocker as malware. What do I do?**
Any detections are most likely a false positive. If you don't trust me, feel free to download the repository and compile the project from source. Otherwise, add an exception to your antivirus for `rbxfpsunlocker.exe` (or the folder it is in).

Any detections are most likely a false positive. If you don't trust me, feel free to download the repository and compile the project from source. Otherwise, add an exception to your anti-virus for `rbxfpsunlocker.exe` (or the folder it is in).

1. **How can I see my FPS?**

Press **Shift+F5** while in-game to view your FPS. This won't work for Roblox Studio (use a program like Fraps to view FPS there).

1. **I used this unlocker and my framerate is the same or below 60. Why?**

I say with great emphasis, as this seems to be a common misconception, that Roblox FPS Unlocker is an FPS _unlocker_ and not a _booster_. It will not boost Roblox's performance in any way and only removes Roblox's 60 FPS limit. To take advantage of RFU, a computer powerful enough to run Roblox at more than 60 FPS is required.

This being said, if you know your computer is powerful enough but still aren't seeing higher framerates with the unlocker, feel free to [submit an issue](https://github.com/axstin/rbxfpsunlocker/issues/new).

1. **Can I set a custom framerate cap?**

Custom framerate limits can be set by changing the `FPSCap` value inside the `settings` file located in the same folder as `rbxfpsunlocker.exe` and reloading settings (RFU->Load Settings). Changing the cap with RFU's menu will reset/overwrite this value.

## Disclaimer

Around June 21st, 2018 I received reports that Roblox was [handing out bans](https://i.imgur.com/i4NEGB0.png) to players using this tool. Roblox most likely assumes that `rbxfpsunlocker.dll` is an exploit or a cheat. I fixed this issue in [release 1.6](https://github.com/axstin/rbxfpsunlocker/releases/tag/v1.6) and can confirm injecting rbxfpsunlocker is now "invisible" to Roblox. **HOWEVER, this won't stop Roblox from releasing a new detection in the future. Please use this tool at your own risk** and keep in touch with this repository for updates.

**EDIT:** [Version 4.0](https://github.com/axstin/rbxfpsunlocker/releases/tag/v4.0) of Roblox FPS Unlocker further reduces the risk of bans or warns as DLL injection is no longer used. See the changelog for more information.

<sub>roblox this isn't an exploit no bans please :(</sub>
35 changes: 27 additions & 8 deletions injector/main.cpp
Expand Up @@ -137,7 +137,7 @@ size_t FindTaskSchedulerFrameDelayOffset(HANDLE process, const void *scheduler)
static const double frame_delay = 1.0 / 60.0;
double difference = *(double *)(buffer + i) - frame_delay;
difference = difference < 0 ? -difference : difference;
if (difference < 0.01) return 0x200 + i;
if (difference < 0.004) return 0x200 + i;
}

return -1;
Expand All @@ -147,12 +147,28 @@ const void *FindTaskScheduler(HANDLE process, const char **error = nullptr)
{
try
{
ProcUtil::ProcessInfo info(process);
ProcUtil::ProcessInfo info;

if (!info.module.base)
int tries = 5;
int wait_time = 100;

while (true)
{
if (error) *error = "Failed to get process base! If you are on a 64-bit operating system, make sure you are using the 64-bit version of Roblox FPS Unlocker.";
return nullptr;
info = ProcUtil::ProcessInfo(process);
if (info.module.base != nullptr)
break;

if (tries--)
{
printf("[%p] Retrying in %dms...\n", process, wait_time);
Sleep(wait_time);
wait_time *= 2;
}
else
{
if (error) *error = "Failed to get process base! Restart Roblox FPS Unlocker or, if you are on a 64-bit operating system, make sure you are using the 64-bit version of Roblox FPS Unlocker.";
return nullptr;
}
}

auto start = (const uint8_t *)info.module.base;
Expand Down Expand Up @@ -269,7 +285,7 @@ struct RobloxProcess
{
try
{
static const double min_frame_delay = 1.0 / 10000.0; // just using 0 here causes roblox to freeze for some reason
static const double min_frame_delay = 1.0 / 10000.0;
double frame_delay = cap <= 0.0 ? min_frame_delay : 1.0 / cap;

ProcUtil::Write(handle, fd_ptr, frame_delay);
Expand Down Expand Up @@ -486,8 +502,11 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
{
UI::ToggleConsole();

printf("Checking for updates...\n");
if (CheckForUpdates()) return 0;
if (Settings::CheckForUpdates)
{
printf("Checking for updates...\n");
if (CheckForUpdates()) return 0;
}

printf("Minimizing to system tray in 2 seconds...\n");
Sleep(2000);
Expand Down
15 changes: 9 additions & 6 deletions injector/procutil.h
Expand Up @@ -103,9 +103,9 @@ namespace ProcUtil
struct ModuleInfo
{
std::filesystem::path path;
void *base;
size_t size;
void *entry_point;
void *base = nullptr;
size_t size = 0;
void *entry_point = nullptr;

HMODULE GetHandle() const
{
Expand All @@ -115,13 +115,13 @@ namespace ProcUtil

struct ProcessInfo
{
HANDLE handle;
HANDLE handle = NULL;
ModuleInfo module;

DWORD id;
DWORD id = 0;
std::string name;

HWND window;
HWND window = NULL;
std::string window_title;

bool FindMainWindow() // a.k.a. find first window associated with the process that is visible
Expand Down Expand Up @@ -151,6 +151,9 @@ namespace ProcUtil
return window != NULL;
}

ProcessInfo()
{}

ProcessInfo(HANDLE handle, bool find_window = false)
: handle(handle), window(NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion injector/rfu.h
@@ -1,6 +1,6 @@
#pragma once

#define RFU_VERSION "4.0"
#define RFU_VERSION "4.1"
#define RFU_GITHUB_REPO "axstin/rbxfpsunlocker"

bool CheckForUpdates();
Expand Down
4 changes: 4 additions & 0 deletions injector/settings.cpp
Expand Up @@ -14,6 +14,7 @@ namespace Settings
unsigned char FPSCapSelection = 0;
double FPSCap = 0.0;
bool UnlockStudio = false;
bool CheckForUpdates = true;

bool Init()
{
Expand Down Expand Up @@ -55,6 +56,8 @@ namespace Settings
FPSCap = std::stod(value);
else if (key == "UnlockStudio")
UnlockStudio = std::stoi(value) != 0;
else if (key == "CheckForUpdates")
CheckForUpdates = std::stoi(value) != 0;
}
catch (std::exception& e)
{
Expand All @@ -81,6 +84,7 @@ namespace Settings

file << "FPSCapSelection=" << std::to_string(FPSCapSelection) << std::endl;
file << "FPSCap=" << std::to_string(FPSCap) << std::endl;
file << "CheckForUpdates=" << std::to_string(CheckForUpdates) << std::endl;

return true;
}
Expand Down
1 change: 1 addition & 0 deletions injector/settings.h
Expand Up @@ -22,6 +22,7 @@ namespace Settings
extern unsigned char FPSCapSelection;
extern double FPSCap;
extern bool UnlockStudio;
extern bool CheckForUpdates;

bool Init();
bool Load();
Expand Down
6 changes: 6 additions & 0 deletions injector/ui.cpp
Expand Up @@ -17,6 +17,7 @@
#define RFU_TRAYMENU_LOADSET WM_APP + 6
#define RFU_TRAYMENU_GITHUB WM_APP + 7
#define RFU_TRAYMENU_STUDIO WM_APP + 8
#define RFU_TRAYMENU_CFU WM_APP + 9

#define RFU_FCS_FIRST (WM_APP + 10)
#define RFU_FCS_NONE RFU_FCS_FIRST + 0
Expand Down Expand Up @@ -59,6 +60,7 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#else
AppendMenu(popup, MF_STRING | (Settings::UnlockStudio ? MF_CHECKED : 0), RFU_TRAYMENU_STUDIO, "Unlock Studio");
#endif
AppendMenu(popup, MF_STRING | (Settings::CheckForUpdates ? MF_CHECKED : 0), RFU_TRAYMENU_CFU, "Check for Updates");

HMENU submenu = CreatePopupMenu();
AppendMenu(submenu, MF_STRING, RFU_FCS_NONE, "None");
Expand Down Expand Up @@ -118,6 +120,10 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
CheckMenuItem(popup, RFU_TRAYMENU_STUDIO, Settings::UnlockStudio ? MF_CHECKED : MF_UNCHECKED);
break;
#endif
case RFU_TRAYMENU_CFU:
Settings::CheckForUpdates = !Settings::CheckForUpdates;
CheckMenuItem(popup, RFU_TRAYMENU_CFU, Settings::CheckForUpdates ? MF_CHECKED : MF_UNCHECKED);
break;

default:
if (result >= RFU_FCS_FIRST
Expand Down
2 changes: 1 addition & 1 deletion rbxfpsunlocker/main.cpp
Expand Up @@ -123,7 +123,7 @@ int FindTaskSchedulerFrameDelayOffset(uintptr_t scheduler)
static const double frame_delay = 1.0 / 60.0;
double difference = *(double*)(scheduler + i) - frame_delay;
difference = difference < 0 ? -difference : difference;
if (difference < 0.01) return i;
if (difference < 0.004) return i;
}

return 0;
Expand Down

0 comments on commit 5f0419a

Please sign in to comment.