mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-24 05:10:42 -04:00
Actually add DisplayDevice.c to the solution
This commit is contained in:
parent
0f720bfbe2
commit
4e169c14bd
@ -189,6 +189,7 @@
|
||||
<ClInclude Include="DateTime.h" />
|
||||
<ClInclude Include="DefaultSet.h" />
|
||||
<ClInclude Include="Bitmap.h" />
|
||||
<ClInclude Include="DisplayDevice.h" />
|
||||
<ClInclude Include="Drawer.h" />
|
||||
<ClInclude Include="Entity.h" />
|
||||
<ClInclude Include="EntityEvents.h" />
|
||||
@ -273,6 +274,7 @@
|
||||
<ClCompile Include="D3D9Api.c" />
|
||||
<ClCompile Include="DefaultSet.c" />
|
||||
<ClCompile Include="Bitmap.c" />
|
||||
<ClCompile Include="DisplayDevice.c" />
|
||||
<ClCompile Include="Drawer.c" />
|
||||
<ClCompile Include="EnvRenderer.c" />
|
||||
<ClCompile Include="EventHandler.c" />
|
||||
|
@ -151,6 +151,12 @@
|
||||
<Filter Include="Header Files\Entities\Components">
|
||||
<UniqueIdentifier>{e36a6223-ce95-4439-aa54-df32b9828ae0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\Platform\Window">
|
||||
<UniqueIdentifier>{e4324350-79a5-4976-a8cc-28881077ca9a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\Platform\Window">
|
||||
<UniqueIdentifier>{37746374-0a3a-415c-99a6-e1e350328eab}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="NotchyGenerator.h">
|
||||
@ -408,6 +414,9 @@
|
||||
<ClInclude Include="TiltComp.h">
|
||||
<Filter>Header Files\Entities\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DisplayDevice.h">
|
||||
<Filter>Header Files\Platform\Window</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="NotchyGenerator.c">
|
||||
@ -623,5 +632,8 @@
|
||||
<ClCompile Include="ChickenModel.c">
|
||||
<Filter>Source Files\Entities\Model</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DisplayDevice.c">
|
||||
<Filter>Source Files\Platform\Window</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -17,6 +17,6 @@ DisplayDevice DisplayDevice_Make(DisplayResolution* curResolution) {
|
||||
|
||||
void DisplayDevice_SetBounds(DisplayDevice* device, Rectangle* bounds) {
|
||||
device->Bounds = *bounds;
|
||||
device->CurResolution.Width = bounds.Width;
|
||||
device->CurResolution.Height = bounds.Height;
|
||||
device->CurResolution.Width = bounds->Width;
|
||||
device->CurResolution.Height = bounds->Height;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
#ifndef CS_DISPLAYDEVICE_H
|
||||
#define CS_DISPLAYDEVICE_H
|
||||
#include "Typedefs.h"
|
||||
#include "2DStructs.h"
|
||||
/* Contains structs related to monitor displays.
|
||||
Copyright 2017 ClassicalSharp | Licensed under BSD-3 | Based originally on OpenTK
|
||||
*/
|
||||
|
@ -1,42 +0,0 @@
|
||||
#region-- - License-- -
|
||||
/* Licensed under the MIT/X11 license.
|
||||
* Copyright (c) 2006-2008 the OpenTK team.
|
||||
* This notice may not be removed.
|
||||
* See license.txt for licensing detailed licensing details.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenTK {
|
||||
|
||||
/// <summary> Contains information regarding a monitor's display resolution. </summary>
|
||||
public class DisplayResolution {
|
||||
internal DisplayResolution() { }
|
||||
|
||||
// Creates a new DisplayResolution object for the primary DisplayDevice.
|
||||
internal DisplayResolution(int width, int height, int bitsPerPixel, float refreshRate) {
|
||||
// Refresh rate may be zero, since this information may not be available on some platforms.
|
||||
if (width <= 0) throw new ArgumentOutOfRangeException("width", "Must be greater than zero.");
|
||||
if (height <= 0) throw new ArgumentOutOfRangeException("height", "Must be greater than zero.");
|
||||
if (bitsPerPixel <= 0) throw new ArgumentOutOfRangeException("bitsPerPixel", "Must be greater than zero.");
|
||||
if (refreshRate < 0) throw new ArgumentOutOfRangeException("refreshRate", "Must be greater than, or equal to zero.");
|
||||
|
||||
Width = width; Height = height;
|
||||
BitsPerPixel = bitsPerPixel;
|
||||
RefreshRate = refreshRate;
|
||||
}
|
||||
|
||||
/// <summary> Returns the width of this display in pixels. </summary>
|
||||
public int Width;
|
||||
|
||||
/// <summary> Returns the height of this display in pixels. </summary>
|
||||
public int Height;
|
||||
|
||||
/// <summary> Returns the number of bits per pixel of this display. Typical values include 8, 16, 24 and 32. </summary>
|
||||
public int BitsPerPixel;
|
||||
|
||||
/// <summary> Returns the vertical refresh rate of this display. </summary>
|
||||
public float RefreshRate;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user