Kautenja / RackNES

A Nintendo Entertainment System (NES) emulator module for VCV Rack.
Other
98 stars 3 forks source link

Make "Load ROM" dialog filter by .nes files #3

Closed AndrewBelt closed 4 years ago

AndrewBelt commented 4 years ago

Adding a file extension filter makes it easier for users to load the correct ROM file. osdialog supports extension filters with the following code.

osdialog_filters *filters = osdialog_filters_parse("NES ROM:nes,NES");
char *path = osdialog_file(OSDIALOG_OPEN, dir.c_str(), NULL, filters);
osdialog_filters_free(filters);
Kautenja commented 4 years ago

Sweet! I didn't know about this functionality.