Well, this is not an emu question (altough it is relationated).
Im using allegro 5 in linux and im not too savy to linux.
Since im doing (trying to do) a crossplatform emu i need the win32 api "FindFirstFile()" / "FileNextFile()".
1- Im doing the GUI now for my emu, but Not SDL neither Allegro 5 have this facilities. It's all ok these libs don't need to have a feature like that.I know there is boost lib. Im really havent tried it yet.
2 - I need linux (in my case Ubuntu with GTK3) don't let the maching go and turn off the screen and neither let it sleep.
How can be done for this 2 things?
Help and posiblly code is appreciated.
Need some help with crossplatform file managment and screen
Moderator: Moderators
Re: Need some help with crossplatform file managment and screen
POSIX (the common API implemented by Linux, *BSD, and proprietary UNIX) has opendir() and friends.
Allegro 5 itself has al_open_directory() and friends. This presumably calls opendir() on POSIX or FindFirstFile() on Windows.,
Allegro 5 itself has al_open_directory() and friends. This presumably calls opendir() on POSIX or FindFirstFile() on Windows.,
- rainwarrior
- Posts: 8734
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Need some help with crossplatform file managment and screen
I don't know a specific answer to your question about preventing sleep / screen-off, but when I've had similar questions in the past I often look to SDL 2's implementation, because it tends to cover stuff like this for many platforms.
e.g. Searching its github repository for "suspend_screensaver" leads to a few things that might be relevant:
https://github.com/libsdl-org/SDL/searc ... creensaver
e.g. Searching its github repository for "suspend_screensaver" leads to a few things that might be relevant:
https://github.com/libsdl-org/SDL/searc ... creensaver
Re: Need some help with crossplatform file managment and screen
Ok thanks guys.
The thing is that i need to have something that "list" the directory. All this becouse i want to make a GUI for my emu. And saying that we have a "/roms" path i need to list that path so i can have a "rom selector" for the user.
The thing is that i need to have something that "list" the directory. All this becouse i want to make a GUI for my emu. And saying that we have a "/roms" path i need to list that path so i can have a "rom selector" for the user.
ANes
Re: Need some help with crossplatform file managment and screen
I think users might prefer the native Win32 file dialog for picking files.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Need some help with crossplatform file managment and screen
Well thats the fact, so Allegro 5 has an option (which i use) of showing the linux/windows openfiledialog().
But i would like to make a "rom list".
ANes
Re: Need some help with crossplatform file managment and screen
Point of internationalization (i18n):
In what font would you be displaying the ROM list? For ROMs whose title contains Chinese characters (e.g. 匹诺曹的复苏), would this font include all commonly used Chinese characters? Or would they display as boxes (e.g. ������) if the user doesn't transliterate (e.g. Pinuocao de fusu) or translate (e.g. The Recovery of Pinocchio) the title?
In what font would you be displaying the ROM list? For ROMs whose title contains Chinese characters (e.g. 匹诺曹的复苏), would this font include all commonly used Chinese characters? Or would they display as boxes (e.g. ������) if the user doesn't transliterate (e.g. Pinuocao de fusu) or translate (e.g. The Recovery of Pinocchio) the title?
Re: Need some help with crossplatform file managment and screen
Very, very good question. I think i would have to use unicode what is utf16?? i don't know.tepples wrote: ↑Fri Apr 01, 2022 3:53 pm Point of internationalization (i18n):
In what font would you be displaying the ROM list? For ROMs whose title contains Chinese characters (e.g. 匹诺曹的复苏), would this font include all commonly used Chinese characters? Or would they display as boxes (e.g. ������) if the user doesn't transliterate (e.g. Pinuocao de fusu) or translate (e.g. The Recovery of Pinocchio) the title?
ANes