Skip to content

Commit 1d5805a

Browse files
committed
Fast version
1 parent 7f1a9f4 commit 1d5805a

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

Makefile.nx

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE
5656
CFLAGS := -g -Wall -O2 -ffunction-sections \
5757
$(ARCH) $(DEFINES) `freetype-config --cflags`
5858

59-
CFLAGS += $(INCLUDE) -D__SWITCH__ -DVERSION=\"v$(APP_VERSION)\"
59+
CFLAGS += $(INCLUDE) -D__SWITCH__ -DVERSION=\"v$(APP_VERSION)-fast\"
6060

6161
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
6262

common/menu.c

+9-8
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ static void drawIcon(int x, int y, int width, int height, const uint8_t *image,
224224
}
225225

226226
static void drawEntry(menuEntry_s* me, int off_x, int is_active) {
227+
return;
227228
ThemeLayoutObject *layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_MenuList];
228229
int x, y;
229230
int start_y = layoutobj->posStart[1];//*(n % 2);
@@ -600,7 +601,7 @@ u32 drawStatus() {
600601
}
601602

602603
void drawButtons(menu_s* menu, bool emptyDir, int *out_basePos) {
603-
ThemeLayoutObject *layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_ButtonA];
604+
/*ThemeLayoutObject *layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_ButtonA];
604605
int basePos[2]={0};
605606
606607
basePos[0] = layoutobj->posStart[0];
@@ -631,7 +632,7 @@ void drawButtons(menu_s* menu, bool emptyDir, int *out_basePos) {
631632
}
632633
633634
out_basePos[0] = basePos[0];
634-
out_basePos[1] = basePos[1];
635+
out_basePos[1] = basePos[1];*/
635636
}
636637

637638
void menuUpdateNetloader(netloaderState *netloader_state) {
@@ -841,7 +842,7 @@ void menuLoop(void) {
841842
}
842843
}
843844

844-
if(active_entry != NULL) {
845+
/*if(active_entry != NULL) {
845846
const char *buttonstr = "";
846847
847848
if (active_entry->type == ENTRY_TYPE_THEME)
@@ -855,11 +856,11 @@ void menuLoop(void) {
855856
DrawTextFromLayoutRelative(ThemeLayoutId_ButtonAText, curPos[0], curPos[1], layoutobj->posStart, curPos, themeCurrent.textColor, buttonstr, 'l');
856857
layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_ButtonA];
857858
DrawTextFromLayoutRelative(ThemeLayoutId_ButtonA, curPos[0], curPos[1], layoutobj->posStart, curPos, themeCurrent.textColor, themeCurrent.buttonAText, 'l');
858-
}
859+
}*/
859860

860861
drawButtons(menu, false, curPos);
861862

862-
if (active_entry && active_entry->type != ENTRY_TYPE_THEME) {
863+
/*if (active_entry && active_entry->type != ENTRY_TYPE_THEME) {
863864
const char *buttonstr = "";
864865
if (active_entry->starred)
865866
buttonstr = textGetString(StrId_Actions_Unstar);
@@ -870,12 +871,12 @@ void menuLoop(void) {
870871
DrawTextFromLayoutRelative(ThemeLayoutId_ButtonXText, curPos[0], curPos[1], layoutobj->posStart, curPos, themeCurrent.textColor, buttonstr, 'r');
871872
layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_ButtonX];
872873
DrawTextFromLayoutRelative(ThemeLayoutId_ButtonX, curPos[0], curPos[1], layoutobj->posStart, curPos, themeCurrent.textColor, themeCurrent.buttonXText, 'l');
873-
}
874+
}*/
874875

875876
}
876877

877-
layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_MenuPath];
878-
if (layoutobj->visible) DrawTextTruncate(layoutobj->font, layoutobj->posStart[0], layoutobj->posStart[1], themeCurrent.textColor, menu->dirname, layoutobj->size[0], "...");
878+
//layoutobj = &themeCurrent.layoutObjects[ThemeLayoutId_MenuPath];
879+
//if (layoutobj->visible) DrawTextTruncate(layoutobj->font, layoutobj->posStart[0], layoutobj->posStart[1], themeCurrent.textColor, menu->dirname, layoutobj->size[0], "...");
879880

880881
menuDrawMsgBox();
881882
}

nx_main/main.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ bool menuUpdate(void) {
214214

215215
handleTouch(menu);
216216

217-
if (down & KEY_Y)
217+
/*if (down & KEY_Y)
218218
{
219219
launchMenuNetloaderTask();
220220
}
@@ -232,12 +232,12 @@ bool menuUpdate(void) {
232232
}
233233
else if(down & KEY_MINUS){
234234
themeMenuStartup();
235-
}
236-
else if (down & KEY_PLUS)
235+
}*/
236+
if (down & KEY_PLUS)
237237
{
238238
exitflag = 1;
239239
}
240-
else if (menu->nEntries > 0)
240+
/*else if (menu->nEntries > 0)
241241
{
242242
int move = 0;
243243
@@ -250,7 +250,7 @@ bool menuUpdate(void) {
250250
if (newEntry < 0) newEntry = 0;
251251
if (newEntry >= menu->nEntries) newEntry = menu->nEntries-1;
252252
menu->curEntry = newEntry;
253-
}
253+
}*/
254254

255255
return exitflag;
256256
}

0 commit comments

Comments
 (0)