mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-29 01:46:38 +00:00
Clamp the selected sample to valid range
This commit is contained in:
@@ -102,7 +102,7 @@ namespace renderdocui.Windows.Dialogs
|
||||
for (int i = 0; i < tex.msSamp; i++)
|
||||
sampleSelect.Items.Add(String.Format("Sample {0}", i));
|
||||
|
||||
sampleSelect.SelectedIndex = (saveData.sample.sampleIndex == ~0U ? 0 : (int)saveData.sample.sampleIndex);
|
||||
sampleSelect.SelectedIndex = Math.Min((int)tex.msSamp, (saveData.sample.sampleIndex == ~0U ? 0 : (int)saveData.sample.sampleIndex));
|
||||
|
||||
if (saveData.sample.sampleIndex == ~0U)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user