Fix CA1822
This commit is contained in:
committed by
Pavel Penev
parent
e4cac1fffc
commit
277699cbd5
@@ -291,7 +291,7 @@ namespace OpenRA.Platforms.Default
|
||||
PauseSound(source, paused);
|
||||
}
|
||||
|
||||
void PauseSound(uint source, bool paused)
|
||||
static void PauseSound(uint source, bool paused)
|
||||
{
|
||||
AL10.alGetSourcei(source, AL10.AL_SOURCE_STATE, out var state);
|
||||
if (paused)
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace OpenRA.Platforms.Default
|
||||
{
|
||||
MouseButton lastButtonBits = MouseButton.None;
|
||||
|
||||
public string GetClipboardText() { return SDL.SDL_GetClipboardText(); }
|
||||
public bool SetClipboardText(string text) { return SDL.SDL_SetClipboardText(text) == 0; }
|
||||
public static string GetClipboardText() { return SDL.SDL_GetClipboardText(); }
|
||||
public static bool SetClipboardText(string text) { return SDL.SDL_SetClipboardText(text) == 0; }
|
||||
|
||||
static MouseButton MakeButton(byte b)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Platforms.Default
|
||||
| ((raw & (int)SDL.SDL_Keymod.KMOD_SHIFT) != 0 ? Modifiers.Shift : 0);
|
||||
}
|
||||
|
||||
int2 EventPosition(Sdl2PlatformWindow device, int x, int y)
|
||||
static int2 EventPosition(Sdl2PlatformWindow device, int x, int y)
|
||||
{
|
||||
// On Windows and Linux (X11) events are given in surface coordinates
|
||||
// These must be scaled to our effective window coordinates
|
||||
|
||||
@@ -351,7 +351,7 @@ namespace OpenRA.Platforms.Default
|
||||
input = new Sdl2Input();
|
||||
}
|
||||
|
||||
byte[] DoublePixelData(byte[] data, Size size)
|
||||
static byte[] DoublePixelData(byte[] data, Size size)
|
||||
{
|
||||
var scaledData = new byte[4 * data.Length];
|
||||
for (var y = 0; y < size.Height; y++)
|
||||
@@ -498,13 +498,13 @@ namespace OpenRA.Platforms.Default
|
||||
public string GetClipboardText()
|
||||
{
|
||||
VerifyThreadAffinity();
|
||||
return input.GetClipboardText();
|
||||
return Sdl2Input.GetClipboardText();
|
||||
}
|
||||
|
||||
public bool SetClipboardText(string text)
|
||||
{
|
||||
VerifyThreadAffinity();
|
||||
return input.SetClipboardText(text);
|
||||
return Sdl2Input.SetClipboardText(text);
|
||||
}
|
||||
|
||||
static void SetSDLAttributes(GLProfile profile)
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Platforms.Default
|
||||
readonly Queue<int> unbindTextures = new();
|
||||
readonly uint program;
|
||||
|
||||
protected uint CompileShaderObject(int type, string name)
|
||||
protected static uint CompileShaderObject(int type, string name)
|
||||
{
|
||||
var ext = type == OpenGL.GL_VERTEX_SHADER ? "vert" : "frag";
|
||||
var filename = Path.Combine(Platform.EngineDir, "glsl", name + "." + ext);
|
||||
|
||||
Reference in New Issue
Block a user