fna-workbench

fna-workbench Commit Details


Date:2016-01-29 08:53:49 (9 years 7 months ago)
Author:Ethan Lee
Branch:master
Commit:a449edc61cc66e4a58e68645bce2b1ad7570cd5e
Parents: 27c0b4a6d84493f4984686ac7cc6ae56a15c6a9a
Message:Possible microoptimizations to FNAPlatform...?

Changes:

File differences

src/FNAPlatform.cs
5757
5858
5959
60
6160
6261
6362
6463
64
65
6566
6667
6768
......
7273
7374
7475
75
76
7677
7778
79
80
7881
79
82
8083
8184
82
85
8386
8487
85
88
8689
8790
88
91
8992
9093
9194
9295
93
96
9497
9598
96
99
97100
98101
99
102
100103
101104
102
105
103106
104107
105
108
106109
107110
108
111
109112
110113
111
114
112115
113116
114117
......
119122
120123
121124
122
125
123126
124127
125128
126129
127130
128131
129
132
130133
131134
132
135
133136
134137
135
138
136139
137140
138141
139142
140143
141
144
142145
143146
144147
145148
146149
147150
148
151
149152
150153
151
154
152155
153156
154
157
155158
156159
157
160
158161
159162
160
161
162
163
163164
164165
165
166
166167
167168
168169
......
173174
174175
175176
176
177
177178
178179
179180
......
183184
184185
185186
186
187
187188
188189
189190
SetGamePadLightBar =SDL2_FNAPlatform.SetGamePadLightBar;
GetStorageRoot =SDL2_FNAPlatform.GetStorageRoot;
IsStoragePathConnected =SDL2_FNAPlatform.IsStoragePathConnected;
Log =SDL2_FNAPlatform.Log;
ShowRuntimeError =SDL2_FNAPlatform.ShowRuntimeError;
TextureDataFromStream =SDL2_FNAPlatform.TextureDataFromStream;
SavePNG =SDL2_FNAPlatform.SavePNG;
Log = Console.WriteLine;
AppDomain.CurrentDomain.ProcessExit += SDL2_FNAPlatform.ProgramExit;
SDL2_FNAPlatform.ProgramInit();
}
public static void UnhookLogger()
{
Log = SDL2_FNAPlatform.Log;
Log = Console.WriteLine;
}
public static Action<string> Log;
public delegate GameWindow CreateWindowFunc();
public static CreateWindowFunc CreateWindow;
public static readonly CreateWindowFunc CreateWindow;
public delegate void DisposeWindowFunc(GameWindow window);
public static DisposeWindowFunc DisposeWindow;
public static readonly DisposeWindowFunc DisposeWindow;
public delegate void BeforeInitializeFunc();
public static BeforeInitializeFunc BeforeInitialize;
public static readonly BeforeInitializeFunc BeforeInitialize;
public delegate void RunLoopFunc(Game game);
public static RunLoopFunc RunLoop;
public static readonly RunLoopFunc RunLoop;
public delegate IGLDevice CreateGLDeviceFunc(
PresentationParameters presentationParameters
);
public static CreateGLDeviceFunc CreateGLDevice;
public static readonly CreateGLDeviceFunc CreateGLDevice;
public delegate IALDevice CreateALDeviceFunc();
public static CreateALDeviceFunc CreateALDevice;
public static readonly CreateALDeviceFunc CreateALDevice;
public delegate void SetPresentationIntervalFunc(PresentInterval interval);
public static SetPresentationIntervalFunc SetPresentationInterval;
public static readonly SetPresentationIntervalFunc SetPresentationInterval;
public delegate GraphicsAdapter[] GetGraphicsAdaptersFunc();
public static GetGraphicsAdaptersFunc GetGraphicsAdapters;
public static readonly GetGraphicsAdaptersFunc GetGraphicsAdapters;
public delegate Keys GetKeyFromScancodeFunc(Keys scancode);
public static GetKeyFromScancodeFunc GetKeyFromScancode;
public static readonly GetKeyFromScancodeFunc GetKeyFromScancode;
public delegate void StartTextInputFunc();
public static StartTextInputFunc StartTextInput;
public static readonly StartTextInputFunc StartTextInput;
public delegate void StopTextInputFunc();
public static StopTextInputFunc StopTextInput;
public static readonly StopTextInputFunc StopTextInput;
public delegate void GetMouseStateFunc(
out int x,
out ButtonState x1,
out ButtonState x2
);
public static GetMouseStateFunc GetMouseState;
public static readonly GetMouseStateFunc GetMouseState;
public delegate void SetMousePositionFunc(
IntPtr window,
int x,
int y
);
public static SetMousePositionFunc SetMousePosition;
public static readonly SetMousePositionFunc SetMousePosition;
public delegate void OnIsMouseVisibleChangedFunc(bool visible);
public static OnIsMouseVisibleChangedFunc OnIsMouseVisibleChanged;
public static readonly OnIsMouseVisibleChangedFunc OnIsMouseVisibleChanged;
public delegate GamePadCapabilities GetGamePadCapabilitiesFunc(int index);
public static GetGamePadCapabilitiesFunc GetGamePadCapabilities;
public static readonly GetGamePadCapabilitiesFunc GetGamePadCapabilities;
public delegate GamePadState GetGamePadStateFunc(
int index,
GamePadDeadZone deadZoneMode
);
public static GetGamePadStateFunc GetGamePadState;
public static readonly GetGamePadStateFunc GetGamePadState;
public delegate bool SetGamePadVibrationFunc(
int index,
float leftMotor,
float rightMotor
);
public static SetGamePadVibrationFunc SetGamePadVibration;
public static readonly SetGamePadVibrationFunc SetGamePadVibration;
public delegate string GetGamePadGUIDFunc(int index);
public static GetGamePadGUIDFunc GetGamePadGUID;
public static readonly GetGamePadGUIDFunc GetGamePadGUID;
public delegate void SetGamePadLightBarFunc(int index, Color color);
public static SetGamePadLightBarFunc SetGamePadLightBar;
public static readonly SetGamePadLightBarFunc SetGamePadLightBar;
public delegate string GetStorageRootFunc();
public static GetStorageRootFunc GetStorageRoot;
public static readonly GetStorageRootFunc GetStorageRoot;
public delegate bool IsStoragePathConnectedFunc(string path);
public static IsStoragePathConnectedFunc IsStoragePathConnected;
public static Action<string> Log;
public static readonly IsStoragePathConnectedFunc IsStoragePathConnected;
public delegate void ShowRuntimeErrorFunc(string title, string message);
public static ShowRuntimeErrorFunc ShowRuntimeError;
public static readonly ShowRuntimeErrorFunc ShowRuntimeError;
public delegate void TextureDataFromStreamFunc(
Stream stream,
int reqHeight = -1,
bool zoom = false
);
public static TextureDataFromStreamFunc TextureDataFromStream;
public static readonly TextureDataFromStreamFunc TextureDataFromStream;
public delegate void SavePNGFunc(
Stream stream,
int imgHeight,
byte[] data
);
public static SavePNGFunc SavePNG;
public static readonly SavePNGFunc SavePNG;
#endregion
}
src/SDL2/SDL2_FNAPlatform.cs
611611
612612
613613
614
615
616
617
618
619614
620615
621616
throw new NotSupportedException("Unhandled SDL2 platform");
}
public static void Log(string Message)
{
Console.WriteLine(Message);
}
public static void ShowRuntimeError(string title, string message)
{
SDL.SDL_ShowSimpleMessageBox(

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.50612s using 13 queries.