bsnes-libretro/nall/main.hpp
Tim Allen 8d5cc0c35e Update to v099r15 release.
byuu says:

Changelog:
- nall::lstring -> nall::string_vector
- added IntegerBitField<type, lo, hi> -- hopefully it works correctly...
- Multitap 1-4 -> Super Multitap 2-5
- fixed SFC PPU CGRAM read regression
- huge amounts of SFC PPU IO register cleanups -- .bits really is lovely
- re-added the read/write(VRAM,OAM,CGRAM) helpers for the SFC PPU
  - but they're now optimized to the realities of the PPU (16-bit data
    sizes / no address parameter / where appropriate)
  - basically used to get the active-display overrides in a unified place;
    but also reduces duplicate code in (read,write)IO
2016-07-04 21:48:17 +10:00

38 lines
962 B
C++

#pragma once
#include <nall/platform.hpp>
#include <nall/string.hpp>
namespace nall {
auto main(string_vector arguments) -> void;
auto main(int argc, char** argv) -> int {
#if defined(PLATFORM_WINDOWS)
CoInitialize(0);
WSAData wsaData{0};
WSAStartup(MAKEWORD(2, 2), &wsaData);
_setmode(_fileno(stdin), O_BINARY);
_setmode(_fileno(stdout), O_BINARY);
_setmode(_fileno(stderr), O_BINARY);
utf8_args(argc, argv);
#endif
string_vector arguments;
for(auto n : range(argc)) {
string argument = argv[n];
//normalize directory and file path arguments
if(directory::exists(argument)) argument.transform("\\", "/").trimRight("/").append("/");
else if(file::exists(argument)) argument.transform("\\", "/").trimRight("/");
arguments.append(argument);
}
return main(move(arguments)), EXIT_SUCCESS;
}
}
auto main(int argc, char** argv) -> int {
return nall::main(argc, argv);
}