Skip to content

Commit 89bc115

Browse files
committed
Do not enable overclocking by default, this should be accessible from the settings menu later on. This fix loads the respective setting at runtime.
1 parent a0b30ca commit 89bc115

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ set(kagekero_sources
3434
src/kero.c
3535
src/main.c
3636
src/map.c
37+
src/overclock.cpp
3738
src/overlay.c
3839
src/pfs.c
3940
src/utils.c

src/core.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "core.h"
1717
#include "kero.h"
1818
#include "map.h"
19+
#include "overclock.h"
1920
#include "overlay.h"
2021
#include "pfs.h"
2122
#include "utils.h"
@@ -308,6 +309,15 @@ static bool handle_button_down(core_t *nc, button_t button)
308309
clear_ring_buffer();
309310
}
310311

312+
if (check_bit(nc->btn, BTN_2))
313+
{
314+
enable_overclock();
315+
}
316+
else if (check_bit(nc->btn, BTN_3))
317+
{
318+
disable_overclock();
319+
}
320+
311321
if ((check_bit(nc->btn, BTN_SOFTRIGHT) || check_bit(nc->btn, BTN_SOFTLEFT)) && !nc->is_paused && !nc->map->show_dialogue)
312322
{
313323
nc->is_paused = true;

src/ngage_appui.cpp

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,20 @@ void CNGageAppUi::ConstructL()
2323
AddToStackL(iAppView);
2424
}
2525

26-
_LIT(KNinjaDll, "E:\\System\\Apps\\kagekero\\ninja.dll");
27-
_LIT(KTurtleDll, "E:\\System\\Apps\\kagekero\\turtle.dll");
28-
2926
CNGageAppUi::CNGageAppUi()
3027
{
3128
RProcess Proc;
3229

3330
iAppView = NULL;
3431

35-
RLibrary lib;
36-
if (lib.Load(KNinjaDll) == KErrNone)
32+
if (KErrNone == Proc.Create(_L("E:\\System\\Apps\\kagekero\\kagekero.exe"), _L("")))
3733
{
38-
UserSvr::ChangeLocale(lib);
39-
lib.Close();
40-
41-
if (KErrNone == Proc.Create(_L("E:\\System\\Apps\\kagekero\\kagekero.exe"), _L("")))
42-
{
43-
TRequestStatus status;
44-
Proc.Logon(status);
45-
Proc.Resume();
46-
User::WaitForRequest(status);
47-
Proc.Close();
48-
Exit();
49-
}
34+
TRequestStatus status;
35+
Proc.Logon(status);
36+
Proc.Resume();
37+
User::WaitForRequest(status);
38+
Proc.Close();
39+
Exit();
5040
}
5141
else
5242
{
@@ -56,13 +46,6 @@ CNGageAppUi::CNGageAppUi()
5646

5747
CNGageAppUi::~CNGageAppUi()
5848
{
59-
RLibrary lib;
60-
if (lib.Load(KTurtleDll) == KErrNone)
61-
{
62-
UserSvr::ChangeLocale(lib);
63-
lib.Close();
64-
}
65-
6649
if (iAppView)
6750
{
6851
RemoveFromStack(iAppView);

0 commit comments

Comments
 (0)