Open Rangi42 opened 1 week ago
I'll give it a look, if I get it working I'll also add the cartridge icons in Windows .ico format.
(SameBoy internally wraps fopen
and co. to use UTF-8 strings for source compatibility with every other OS)
More thoughts:
"Software\\Classes\\.gbc"
already exists with RegOpenKeyEx
, and if so, ask the user whether to continue?HKCR\SameBoy\DefaultIcon
and set it to the .ico path. (Or to use e.g. icon -42 within an EXE or DLL, you can do sameboy.exe,-42
.)HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.gbc\OpenWithList
.
This could be done by having the user run a .reg or .bat file; that's what I do for Polished Map. (See also)
I believe this C code will be the equivalent:
(Of course SameBoy should figure out the right .exe path to pass for the
open
command. And you might use the W or A or neither functions, not sure if SameBoy is used to using wide strings or not.)