mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
Reformatted debug output from previous commit so it no longer generates compilation warnings when compiling in Release mode.
This commit is contained in:
parent
c6b0f38563
commit
3c116da322
2 changed files with 35 additions and 24 deletions
|
@ -65,17 +65,16 @@ namespace CodeImp.DoomBuilder.Actions
|
|||
CooperativeLevel.Nonexclusive | CooperativeLevel.Foreground);
|
||||
|
||||
// Aquire device
|
||||
try
|
||||
{
|
||||
mouse.Acquire();
|
||||
}
|
||||
try { mouse.Acquire(); }
|
||||
#if DEBUG
|
||||
catch (Exception e)
|
||||
{
|
||||
#if DEBUG
|
||||
System.Console.WriteLine("MouseInput initialization failed: " + e.Message);
|
||||
#endif
|
||||
Console.WriteLine("MouseInput initialization failed: " + e.Message);
|
||||
}
|
||||
|
||||
#else
|
||||
catch (Exception) { }
|
||||
#endif
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
@ -129,23 +128,22 @@ namespace CodeImp.DoomBuilder.Actions
|
|||
}
|
||||
|
||||
// Reaquire device
|
||||
try
|
||||
{
|
||||
mouse.Acquire();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
try { mouse.Acquire(); }
|
||||
#if DEBUG
|
||||
System.Console.WriteLine("MouseInput process failed: " + e.Message);
|
||||
#endif
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("MouseInput process failed: " + e.Message);
|
||||
}
|
||||
#else
|
||||
catch (Exception) { }
|
||||
#endif
|
||||
return new Vector2D();
|
||||
}
|
||||
#if DEBUG
|
||||
catch(DirectInputException die)
|
||||
{
|
||||
#if DEBUG
|
||||
System.Console.WriteLine("MouseInput process failed: " + die.Message);
|
||||
#endif
|
||||
Console.WriteLine("MouseInput process failed: " + die.Message);
|
||||
|
||||
// Reaquire device
|
||||
try
|
||||
{
|
||||
|
@ -153,12 +151,19 @@ namespace CodeImp.DoomBuilder.Actions
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
#if DEBUG
|
||||
System.Console.WriteLine("MouseInput process failed: " + die.Message);
|
||||
#endif
|
||||
System.Console.WriteLine("MouseInput process failed: " + e.Message);
|
||||
}
|
||||
return new Vector2D();
|
||||
}
|
||||
#else
|
||||
catch(DirectInputException)
|
||||
{
|
||||
// Reaquire device
|
||||
try { mouse.Acquire(); }
|
||||
catch (Exception) { }
|
||||
return new Vector2D();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -397,14 +397,20 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
// Reset the device
|
||||
device.Reset(displaypp);
|
||||
}
|
||||
#if DEBUG
|
||||
catch(Exception e)
|
||||
{
|
||||
// Failed to re-initialize
|
||||
#if DEBUG
|
||||
Console.WriteLine("Device reset failed: " + e.Message);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
catch (Exception)
|
||||
{
|
||||
// Failed to re-initialize
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Keep a reference to the original buffers
|
||||
backbuffer = device.GetBackBuffer(0, 0);
|
||||
|
|
Loading…
Reference in a new issue