Homebrew [Release] Homebrew Launcher with grid layout

  • Thread starter Thread starter mashers
  • Start date Start date
  • Views Views 674,968
  • Replies Replies 4,218
  • Likes Likes 139
The solution would be proper frame rate control but I don't really know how to handle that.
Call OsGettime() each cycle (returns milliseconds), and store last cycle's time, compare with current Osgettime to check if a new frame has to be rendered to get 60fps.
 
  • Like
Reactions: Margen67
Call OsGettime() each cycle (returns milliseconds), and store last cycle's time, compare with current Osgettime to check if a new frame has to be rendered to get 60fps.
Thanks mate! I adapted the SDL example from section 2.1.3 of this document:

http://www.brandonfoltz.com/downloads/tutorials/The_Game_Loop_and_Frame_Rate_Management.pdf

Here's the code I added to the launcher:

Code:
int main() {

    // ...

    int frameRate = 60;
    int frameMs = 1000 / frameRate;
    int startMs = 0;
    int endMs = 0;
    int delayMs = 0;
    unsigned long long int delayNs = 0;

    while(aptMainLoop()) {
        startMs = osGetTime();

        //Do stuff
        //...
       
       renderFrame();
       gfxFlip();

       endMs = osGetTime();
       delayMs = frameMs - (endMs - startMs);
       delayNs = delayMs * 1000000;
       svcSleepThread(delayNs);
    }

    // ...

}

This seems to work since adjusting the frameRate variable affects the rate and smoothness of the animations. I've attached a 30fps and 60fps example to this post. Would you mind testing them and see if it improves the situation for you?
 

Attachments

  • Like
Reactions: Margen67
60fps seems too fast on n3DS (same as before)
30fps seems pretty good.
The animation isn't always fluid (block sometimes), but I think it can't be fixed (in b73, 30fps, 60fps).

PS: Is it possible to remove the 'R' on the RandomTheme tile?
 
  • Like
Reactions: Margen67
60fps seems too fast on n3DS (same as before)
30fps seems pretty good.
The animation isn't always fluid (block sometimes), but I think it can't be fixed (in b73, 30fps, 60fps).

I agree, 60fps is too fast. I'll leave it at 30fps as this makes the water smoother and also the progress wheel animation more enjoyable.

PS: Is it possible to remove the 'R' on the RandomTheme tile?
Oh I hadn't even noticed it was there! I know what's happened and I'll sort it in the next beta. Thanks for letting me know :)
 
  • Like
Reactions: Margen67
I think the only thing I feel strange is the following Japanese title names.
It seems that no one can get those UTF-8 characters right。


S9sqnzn.png


d4KQ7OB.png


s81B1aX.png


S2fZust.png

Sdhstdb.png
 
  • Like
Reactions: Margen67
I found a very minor little thing.
If I place the marker on the setting or "?" button, without clicking, and I then use either the L or R button to flip page, the marker/highlight is gone, and I can't select anything with the D-Pad. I can just use the touchscreen tho, which also puts the marker back on.
But yeah, it's a little thing, but I thought I'd mention it.
 
  • Like
Reactions: Margen67
I'm almost sure, I'm not the first one to ask, but I think an option to load ARM9 payloads (f.e. ReiNAND, Decrypt9, ...) via Brahma 2 would be pretty useful. Would only work on or below 9.2, of course. CTR Boot Manager, for example, has this, and Brahma 2 is by now pretty easy to include as a library. Including it could be solved the same way the eshop patch is included in HBL v2.5 (via a .SMDH and a .XML).

Maybe that wouldn't even require a change in your source code, and I could simply add start parameters to my own Brahma2Loader (again, same as it is solved for the eshop patch).
 
I think the only thing I feel strange is the following Japanese title names.
It seems that no one can get those UTF-8 characters right。
Yeah I know about that. If I could get sftd working then we could have proper TrueType fonts, but it was too unstable.

I found a very minor little thing.
If I place the marker on the setting or "?" button, without clicking, and I then use either the L or R button to flip page, the marker/highlight is gone, and I can't select anything with the D-Pad. I can just use the touchscreen tho, which also puts the marker back on.
But yeah, it's a little thing, but I thought I'd mention it.
Oh yes! I had never done that so didn't know. I'll fix it :)

@mashers it is possible to hide the 3ds folder on Folders as option?
Absolutely. Good idea. I'll add it to the todo list.

Sorry,but is your loader 2.5?
Yes.
 
  • Like
Reactions: Margen67
Well, I decided to use this with themehax. Does you homebrew launcher themes support sound? Can 3d work on the launcher?


Question in general, does Streetpass still work with launcher on sleep mode?
 
Last edited by KingVamp,
  • Like
Reactions: Margen67
Could you add the current bugs to OP?
Which ones? There are already some on there, have I missed some?

Well, I decided to use this with themehax. Does you homebrew launcher themes support sound? Can 3d work on the launcher?


Question in general, does Streetpass still work with launcher on sleep mode?
No sound yet. It's on the todo list. No 3D either yet and I'm not planning to add it. It is possible though as ctrulib supports 3D display AFAIK. I think street pass does still work but I'm not entirely sure.

Great Work @mashers keep going on!
Since the updates are so fast an auto update option would be great :)
Actually @ihaveamac is busy working on that right now ;)
 
I don't think auto update is a good idea,depend on network,auto update feature could totally freeze the system.
But manually check if a new version exist on server is praticable. A virtual update option in help page would be very nice.
 
Last edited by pdapanda,
  • Like
Reactions: Margen67
I don't think auto update is a good idea,depend on network,auto update feature could totally freeze the system.
But manually check if a new version exist on server is praticable. A virtual update option in help page would be very nice.
It won't background check. It will be a manual option which will download the latest version from GitHub.
 
Sound would be awesome since it would allow for custom music. With that I wouldn't miss the normal home menu at all.

Keep up the great work!
 
  • Like
Reactions: Margen67
Which ones? There are already some on there, have I missed some?


No sound yet. It's on the todo list. No 3D either yet and I'm not planning to add it. It is possible though as ctrulib supports 3D display AFAIK. I think street pass does still work but I'm not entirely sure.


Actually @ihaveamac is busy working on that right now ;)

Oh OK, I didn't look in the todo list
 
  • Like
Reactions: Margen67

Site & Scene News

Popular threads in this forum