C# GoblinXNA:更改屏幕分辨率时发生异常
我在GoblinXNA程序中遇到了一个问题,那就是屏幕分辨率,如果我使用480*640,一切都很好,我的应用程序工作正常C# GoblinXNA:更改屏幕分辨率时发生异常,c#,xna,C#,Xna,我在GoblinXNA程序中遇到了一个问题,那就是屏幕分辨率,如果我使用480*640,一切都很好,我的应用程序工作正常 captureDevice.InitVideoCapture(0, FrameRate._60Hz, Resolution._640x480, ImageFormat.R8G8B8_24, false); 但如果我将其更改为800x600或1280x1024,如下所示: captureDevice.InitVideoCapture(0, Fr
captureDevice.InitVideoCapture(0, FrameRate._60Hz, Resolution._640x480,
ImageFormat.R8G8B8_24, false);
但如果我将其更改为800x600或1280x1024,如下所示:
captureDevice.InitVideoCapture(0, FrameRate._60Hz, Resolution._800x600, ImageFormat.R8G8B8_24, false);
我有个例外
GoblinXNA.GoblinException was unhandled
Message=Could not start video stream
Could not setup graph
Error HRESULT E_FAIL has been returned from a call to a COM component.
Source=GoblinXNA
StackTrace:
at GoblinXNA.Device.Capture.DirectShowCapture.StartupVideo(UCOMIMoniker mon) in C:\GoblinXNAv4.0\src\Device\Capture\DirectShowCapture.cs:line 576
at GoblinXNA.Device.Capture.DirectShowCapture.InitVideoCapture(Int32 videoDeviceID, FrameRate framerate, Resolution resolution, ImageFormat format, Boolean grayscale) in C:\GoblinXNAv4.0\src\Device\Capture\DirectShowCapture.cs:line 276
at Se.HInitialize(Scene scene) in C:\Se\H.cs:line 119
at Se.App.Initialize() in C:\Se\App.cs:line 96
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Microsoft.Xna.Framework.Game.Run()
at Se.Program.Main(String[] args) in C:\Se\Program.cs:line 15
InnerException:
你知道怎么解决这个问题吗
谢谢我通过将DirectShowCapture.cs中的分辨率更改为1280x720并重新编译GoblinXNA.dll成功地解决了这个问题