Exemple #1
0
        private unsafe bool _internalRetroEnvironment(RetroEnvironmentCommand cmd, void *data)
        {
            if (cmd == RetroEnvironmentCommand.GetLogInterface)
            {
                var callback = (RetroLogCallback *)data;
                callback->Log = _internalRetroLogPrintf;

                return(true);
            }
            else
            {
                return(_wrappedRetroEnvironment(cmd, data));
            }
        }
        private bool _environment(RetroEnvironmentCommand cmd, void *data)
        {
            if (cmd != RetroEnvironmentCommand.GetVariableUpdate)
            {
                Logger.Debug("Core calling command: {0}", cmd);
            }

            switch (cmd)
            {
            case RetroEnvironmentCommand.SetRotation:
                return(_setRotation((uint *)data));

            case RetroEnvironmentCommand.GetOverscan:
                return(_getOverscan((bool *)data));

            case RetroEnvironmentCommand.GetCanDupe:
                return(_getCanDupe((bool *)data));

            case RetroEnvironmentCommand.SetMessage:
                return(_setMessage((RetroMessage *)data));

            case RetroEnvironmentCommand.Shutdown:
                return(_shutdown());

            case RetroEnvironmentCommand.SetPerformanceLevel:
                return(_setPerformanceLevel((uint *)data));

            case RetroEnvironmentCommand.GetSystemDirectory:
                return(_getSystemDirectory(new IntPtr(data)));

            case RetroEnvironmentCommand.SetPixelFormat:
                return(_setPixelFormat((RetroPixelFormat *)data));

            case RetroEnvironmentCommand.SetInputDescriptors:
                return(_setInputDescriptors((RetroInputDescriptor *)data));

            case RetroEnvironmentCommand.SetKeyboardCallback:
                return(_setKeyboardCallback((RetroKeyboardCallback *)data));

            case RetroEnvironmentCommand.SetDiskControlInterface:
                return(_setDiskControlInterface((RetroDiskControlCallback *)data));

            case RetroEnvironmentCommand.SetHwRender:
                return(_setHwRender((RetroHwRenderCallback *)data));

            case RetroEnvironmentCommand.GetVariable:
                return(_getVariable((RetroVariable *)data));

            case RetroEnvironmentCommand.SetVariables:
                return(_setVariables((RetroVariable *)data));

            case RetroEnvironmentCommand.GetVariableUpdate:
                return(_getVariableUpdate((bool *)data));

            case RetroEnvironmentCommand.SetSupportNoGame:
                return(_setSupportNoGame((bool *)data));

            case RetroEnvironmentCommand.GetLibretroPath:
                return(_getLibretroPath(new IntPtr(data)));

            case RetroEnvironmentCommand.SetAudioCallback:
                return(true);

            case RetroEnvironmentCommand.SetFrameTimeCallback:
                return(_setFrameTimeCallback((RetroFrameTimeCallback *)data));

            case RetroEnvironmentCommand.GetRumbleInterface:
                return(true);

            case RetroEnvironmentCommand.GetInputDeviceCapabilities:
                return(_getInputDeviceCapabilities((long *)data));

            case RetroEnvironmentCommand.GetSensorInterface:
                return(true);

            case RetroEnvironmentCommand.GetCameraInterface:
                return(true);

            case RetroEnvironmentCommand.GetPerfInterface:
                return(_getPerfInterface((RetroPerfCallback *)data));

            case RetroEnvironmentCommand.GetLocationInterface:
                return(true);

            case RetroEnvironmentCommand.GetCoreAssetsDirectory:
                return(_getCoreAssetsDirectory(new IntPtr(data)));

            case RetroEnvironmentCommand.GetSaveDirectory:
                return(_getSaveDirectory(new IntPtr(data)));

            case RetroEnvironmentCommand.SetSystemAvInfo:
                return(_setSystemAvInfo((RetroSystemAvInfo *)data));

            case RetroEnvironmentCommand.SetProcAddressCallback:
                return(_setProcAddressCallback((RetroGetProcAddressInterface *)data));

            case RetroEnvironmentCommand.SetSubsystemInfo:
                return(_setSubsystemInfo((RetroSubsystemInfo *)data));

            case RetroEnvironmentCommand.SetControllerInfo:
                return(_setControllerInfo((RetroControllerInfo *)data));

            case RetroEnvironmentCommand.SetMemoryMaps:
                return(true);

            case RetroEnvironmentCommand.SetGeometry:
                return(_setGeometry((RetroGameGeometry *)data));

            case RetroEnvironmentCommand.GetUsername:
                return(_getUsername(new IntPtr(data)));

            case RetroEnvironmentCommand.GetLanguage:
                return(_getLanguage((RetroLanguage *)data));

            case RetroEnvironmentCommand.GetCurrentSoftwareFramebuffer:
                return(_getCurrentSoftwareFramebuffer((RetroFramebuffer *)data));

            case RetroEnvironmentCommand.SetHwSharedContext:
                return(_setHwSharedContext());

            case RetroEnvironmentCommand.GetVfsInterface:
                return(_getVfsInterface((RetroVfsInterfaceInfo *)data));

            default:
                return(false);
            }
        }