예제 #1
0
        private void _ntrClient_Connected(bool Connected)
        {
            if (Connected)
            {
                _NtrClient.sendEmptyPacket(5);                 //list process packet

                _Connected = true;
                //if (_PatchMem)
                //{
                //    //byte[] bytes = { 0x70, 0x47 };
                //    //_WriteToDeviceMemory(0x0105AE4, bytes, 0x1a);
                //    _PatchMem = false;
                //}
                //else
                {
                    uint pm = (uint)(_ViewSettings.PriorityMode ? 1 : 0);
                    remoteplay(pm, _ViewSettings.PriorityFactor, _ViewSettings.PictureQuality, _ViewSettings.QosValue);
                    _DisconnectTimeout.Start();

                    if (System.IO.File.Exists(_ViewSettings.ViewerPath))
                    {
                        StringBuilder args = new StringBuilder();

                        args.Append("-l ");
                        args.Append(((_ViewSettings.ViewMode == Model.Orientations.Vertical) ? "0" : "1") + " ");
                        args.Append("-t " + _ViewSettings.TopScale.ToString() + " ");
                        args.Append("-b " + _ViewSettings.BottomScale.ToString());

                        System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo(_ViewSettings.ViewerPath);
                        p.Verb            = "runas";
                        p.Arguments       = args.ToString().Replace(',', '.');
                        _NtrViewerProcess = Process.Start(p);
                    }
                    else
                    {
                        WriteToLog("NTRViewer not found, please run it manually as admin");
                    }
                }
            }
        }
예제 #2
0
        public void remoteplay(uint priorityMode = 0, uint priorityFactor = 5, uint quality = 90, double qosValue = 15)
        {
            uint num = 1;

            if (priorityMode == 1)
            {
                num = 0;
            }
            uint qosval = (uint)(qosValue * 1024 * 1024 / 8);

            _NtrClient.sendEmptyPacket(901, num << 8 | priorityFactor, quality, qosval);
            WriteToLog("OK: Remoteplay initiated. This client will disconnect in 10 seconds.");
        }