예제 #1
0
파일: Main.cpp 프로젝트: nzeemin/nemigabtl
//
//   FUNCTION: InitInstance(HINSTANCE, int)
//
//   PURPOSE: Saves instance handle and creates main window
//
//   COMMENTS:
//
//        In this function, we save the instance handle in a global variable and
//        create and display the main program window.
//
BOOL InitInstance(HINSTANCE /*hInstance*/, int /*nCmdShow*/)
{
    INITCOMMONCONTROLSEX ics;  ics.dwSize = sizeof(ics);
    ics.dwICC = ICC_WIN95_CLASSES;
    InitCommonControlsEx(&ics);

#if !defined(PRODUCT)
    DebugLogClear();
#endif
    Settings_Init();

    ParseCommandLine();  // Override settings by command-line option if needed

    if (!Emulator_Init())
        return FALSE;
    WORD conf = (WORD) Settings_GetConfiguration();
    if (conf == 0) conf = EMU_CONF_NEMIGA303;
    if (!Emulator_InitConfiguration(conf))
        return FALSE;
    Emulator_SetSound(Settings_GetSound());
    Emulator_SetSpeed(Settings_GetRealSpeed());

    if (!CreateMainWindow())
        return FALSE;

    return TRUE;
}
예제 #2
0
파일: Main.cpp 프로젝트: VWarlock/neonbtl
//
//   FUNCTION: InitInstance(HINSTANCE, int)
//
//   PURPOSE: Saves instance handle and creates main window
//
//   COMMENTS:
//
//        In this function, we save the instance handle in a global variable and
//        create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
    INITCOMMONCONTROLSEX ics;  ics.dwSize = sizeof(ics);
    ics.dwICC = ICC_WIN95_CLASSES;
    InitCommonControlsEx(&ics);

#if !defined(PRODUCT)
    DebugLogClear();
#endif
    Settings_Init();
    //Joystick_Init();
    //Joystick_SelectJoystick(Settings_GetJoystick());
    if (!Emulator_Init())
        return FALSE;

    int conf = Settings_GetConfiguration();
    //if (conf == 0) //TODO
    if (!Emulator_InitConfiguration((NeonConfiguration)conf))
        return FALSE;

    Emulator_SetSound(Settings_GetSound());

    if (!CreateMainWindow())
        return FALSE;

    return TRUE;
}
예제 #3
0
//
//   FUNCTION: InitInstance(HINSTANCE, int)
//
//   PURPOSE: Saves instance handle and creates main window
//
//   COMMENTS:
//
//        In this function, we save the instance handle in a global variable and
//        create and display the main program window.
//
BOOL InitInstance(HINSTANCE /*hInstance*/, int /*nCmdShow*/)
{
    INITCOMMONCONTROLSEX ics;  ics.dwSize = sizeof(ics);
    ics.dwICC = ICC_WIN95_CLASSES;
    InitCommonControlsEx(&ics);

#if !defined(PRODUCT)
    DebugLogClear();
#endif
    Settings_Init();
    if (!Emulator_Init()) return FALSE;
    Emulator_SetSound(Settings_GetSound());

    if (!CreateMainWindow())
        return FALSE;

    return TRUE;
}