mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-04-02 10:42:14 -04:00
byuu says: Most notably, this release adds Nintendo DS emulation. The Nintendo DS module was written entirely by Cydrak, so please give him all of the credit for it. I for one am extremely grateful to be allowed to use his module in bsnes. The Nintendo DS emulator's standalone name is dasShiny. You will need the Nintendo DS firmware, which I cannot provide, in order to use it. It also cannot (currently?) detect the save type used by NDS games. As such, manifest.xml files must be created manually for this purpose. The long-term plan is to create a database of save types for each game. Also, you will need an analog input device for the touch screen for now (joypad axes work well.) There have also been a lot of changes from my end: a unified manifest.xml format across all systems, major improvements to SPC7110 emulation, enhancements to RTC emulation, MSU1 enhancements, icons in the file browser list, improvements to SNES coprocessor memory mapping, cleanups and improvements in the libraries used to build bsnes, etc. I've also included kaijuu (which allows launching game folders directly with bsnes) and purify (which allows opening images that are compressed, have copier headers, and have wrong extensions); both of which are fully GUI-based. This release only loads game folders, not files. Use purify to load ROM files in bsnes. Note that this will likely be the last release for a long time, and that I will probably rename the emulator for the next release, due to how many additional systems it now supports.
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
#ifndef NALL_INVOKE_HPP
|
|
#define NALL_INVOKE_HPP
|
|
|
|
//void invoke(const string &name, const string& args...);
|
|
//if a program is specified, it is executed with the arguments provided
|
|
//if a file is specified, the file is opened using the program associated with said file type
|
|
//if a folder is specified, the folder is opened using the associated file explorer
|
|
//if a URL is specified, the default web browser is opened and pointed at the URL requested
|
|
//path environment variable is always consulted
|
|
//execution is asynchronous (non-blocking); use system() for synchronous execution
|
|
|
|
#include <nall/string.hpp>
|
|
#ifdef _WIN32
|
|
#include <nall/windows/utf8.hpp>
|
|
#endif
|
|
|
|
namespace nall {
|
|
|
|
#ifdef _WIN32
|
|
|
|
template<typename... Args>
|
|
inline void invoke(const string &name, Args&&... args) {
|
|
lstring argl(std::forward<Args>(args)...);
|
|
for(auto &arg : argl) if(arg.position(" ")) arg = {"\"", arg, "\""};
|
|
string arguments = argl.concatenate(" ");
|
|
ShellExecuteW(NULL, NULL, utf16_t(name), utf16_t(arguments), NULL, SW_SHOWNORMAL);
|
|
}
|
|
|
|
#else
|
|
|
|
template<typename... Args>
|
|
inline void invoke(const string &name, Args&&... args) {
|
|
pid_t pid = fork();
|
|
if(pid == 0) {
|
|
const char *argv[1 + sizeof...(args) + 1], **argp = argv;
|
|
lstring argl(std::forward<Args>(args)...);
|
|
*argp++ = (const char*)name;
|
|
for(auto &arg : argl) *argp++ = (const char*)arg;
|
|
*argp++ = nullptr;
|
|
|
|
if(execvp(name, (char* const*)argv) < 0) {
|
|
execlp("xdg-open", "xdg-open", (const char*)name, nullptr);
|
|
}
|
|
exit(0);
|
|
}
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
#endif
|