public void SetMode(int width, int height, float refreshRate) { Width = width; Height = height; _selectedMode = _findVideoMode(width); Lines = ArvidClient.arvid_client_get_video_mode_lines(_selectedMode, refreshRate); if (Lines < 0) { throw new Exception("Could not find a mode that satisfies the selected refresh rate"); } var res = ArvidClient.arvid_client_set_video_mode(_selectedMode, Lines); if (res < 0) { throw new Exception("Unable to set Arvid Mode"); } RefreshRate = ArvidClient.arvid_client_get_video_mode_refresh_rate(_selectedMode, Lines); if (RefreshRate < 0) { throw new Exception("Unable to get final refresh rate"); } Console.WriteLine("{0}x{1}@{2}", Width, Height, RefreshRate); }
public void SetMode(int width, int height) { Width = width; Height = height; _selectedMode = _findVideoMode(width); var res = ArvidClient.arvid_client_set_video_mode(_selectedMode, Lines); if (res < 0) { throw new Exception("Unable to set Arvid Mode"); } }