PGO - Small fixes/improvements
This commit is contained in:
parent
12c76168e8
commit
6c50cc4bb9
2 changed files with 35 additions and 8 deletions
|
@ -44,16 +44,18 @@ namespace InteropEmu {
|
|||
{
|
||||
FolderUtilities::SetHomeFolder(homeFolder);
|
||||
|
||||
_windowHandle = windowHandle;
|
||||
_viewerHandle = dxViewerHandle;
|
||||
if(windowHandle != nullptr && dxViewerHandle != nullptr) {
|
||||
_windowHandle = windowHandle;
|
||||
_viewerHandle = dxViewerHandle;
|
||||
|
||||
_renderer = new NES::Renderer(_viewerHandle);
|
||||
_soundManager = new SoundManager(_windowHandle);
|
||||
_renderer = new NES::Renderer(_viewerHandle);
|
||||
_soundManager = new SoundManager(_windowHandle);
|
||||
|
||||
ControlManager::RegisterKeyManager(new WindowsKeyManager(_windowHandle));
|
||||
ControlManager::RegisterKeyManager(new WindowsKeyManager(_windowHandle));
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
_inputDevices.push_back(shared_ptr<StandardController>(new StandardController(i)));
|
||||
for(int i = 0; i < 4; i++) {
|
||||
_inputDevices.push_back(shared_ptr<StandardController>(new StandardController(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,37 @@
|
|||
#include <thread>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
extern "C" {
|
||||
void __stdcall InitializeEmu(char* homeFolder, void*, void*);
|
||||
void __stdcall LoadROM(char* filename);
|
||||
void __stdcall Run();
|
||||
void __stdcall Stop();
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
LoadROM(argv[1]);
|
||||
using namespace std;
|
||||
vector<char*> testRoms{
|
||||
"..\\Games\\Super Dodge Ball (USA).nes",
|
||||
"..\\Games\\Super Mario Bros. (USA).nes",
|
||||
"..\\Games\\Mega Man 2 (USA).nes",
|
||||
"..\\Games\\Mega Man 3 (USA).nes",
|
||||
"..\\Games\\Mega Man 4 (USA).nes",
|
||||
"..\\Games\\MMC5\\Just Breed (J) [!].nes"
|
||||
};
|
||||
|
||||
InitializeEmu("C:\\Windows\\Temp\\Mesen", nullptr, nullptr);
|
||||
LoadROM(testRoms[0]);
|
||||
thread testThread([testRoms] {
|
||||
for(int i = 1; i < testRoms.size(); i++) {
|
||||
std::this_thread::sleep_for(std::chrono::duration<int, std::milli>(5000));
|
||||
LoadROM(testRoms[i]);
|
||||
}
|
||||
Stop();
|
||||
});
|
||||
Run();
|
||||
testThread.join();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue