SDL 2.0.2 update. Includes some extras as well.
This commit is contained in:
parent
60454e8878
commit
2e719b0650
53
src/SDL2.cs
53
src/SDL2.cs
@ -208,7 +208,7 @@ namespace SDL2
|
|||||||
public const string SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS =
|
public const string SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS =
|
||||||
"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS";
|
"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS";
|
||||||
public const string SDL_HINT_IDLE_TIMER_DISABLED =
|
public const string SDL_HINT_IDLE_TIMER_DISABLED =
|
||||||
"SDL_IOS_DLE_TIMER_DISABLED";
|
"SDL_IOS_IDLE_TIMER_DISABLED";
|
||||||
public const string SDL_HINT_ORIENTATIONS =
|
public const string SDL_HINT_ORIENTATIONS =
|
||||||
"SDL_IOS_ORIENTATIONS";
|
"SDL_IOS_ORIENTATIONS";
|
||||||
public const string SDL_HINT_XINPUT_ENABLED =
|
public const string SDL_HINT_XINPUT_ENABLED =
|
||||||
@ -221,14 +221,28 @@ namespace SDL2
|
|||||||
"SDL_ALLOW_TOPMOST";
|
"SDL_ALLOW_TOPMOST";
|
||||||
public const string SDL_HINT_TIMER_RESOLUTION =
|
public const string SDL_HINT_TIMER_RESOLUTION =
|
||||||
"SDL_TIMER_RESOLUTION";
|
"SDL_TIMER_RESOLUTION";
|
||||||
|
public const string SDL_HINT_RENDER_SCALE_QUALITY =
|
||||||
|
"SDL_RENDER_SCALE_QUALITY";
|
||||||
|
|
||||||
|
/* Only available in SDL 2.0.1 or higher */
|
||||||
public const string SDL_HINT_VIDEO_HIGHDPI_DISABLED =
|
public const string SDL_HINT_VIDEO_HIGHDPI_DISABLED =
|
||||||
"SDL_VIDEO_HIGHDPI_DISABLED";
|
"SDL_VIDEO_HIGHDPI_DISABLED";
|
||||||
public const string SDL_HINT_RENDER_SCALE_QUALITY =
|
|
||||||
"SDL_HINT_RENDER_SCALE_QUALITY";
|
/* Only available in SDL 2.0.2 or higher */
|
||||||
|
public const string SDL_HINT_CTRL_CLICK_EMULATE_RIGHT_CLICK =
|
||||||
|
"SDL_CTRL_CLICK_EMULATE_RIGHT_CLICK";
|
||||||
|
public const string SDL_HINT_VIDEO_FULLSCREEN_SPACES =
|
||||||
|
"SDL_VIDEO_FULLSCREEN_SPACES";
|
||||||
|
public const string SDL_HINT_VIDEO_WIN_D3DCOMPILER =
|
||||||
|
"SDL_VIDEO_WIN_D3DCOMPILER";
|
||||||
public const string SDL_HINT_MOUSE_RELATIVE_MODE_WARP =
|
public const string SDL_HINT_MOUSE_RELATIVE_MODE_WARP =
|
||||||
"SDL_HINT_MOUSE_RELATIVE_MODE_WARP";
|
"SDL_MOUSE_RELATIVE_MODE_WARP";
|
||||||
|
public const string SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT =
|
||||||
|
"SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT";
|
||||||
public const string SDL_HINT_VIDEO_ALLOW_SCREENSAVER =
|
public const string SDL_HINT_VIDEO_ALLOW_SCREENSAVER =
|
||||||
"SDL_HINT_VIDEO_ALLOW_SCREENSAVER";
|
"SDL_VIDEO_ALLOW_SCREENSAVER";
|
||||||
|
public const string SDL_HINT_ACCELEROMETER_AS_JOYSTICK =
|
||||||
|
"SDL_ACCELEROMETER_AS_JOYSTICK";
|
||||||
|
|
||||||
public enum SDL_HintPriority
|
public enum SDL_HintPriority
|
||||||
{
|
{
|
||||||
@ -1377,6 +1391,10 @@ namespace SDL2
|
|||||||
string extension
|
string extension
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* Only available in SDL 2.0.2 or higher */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void SDL_GL_ResetAttributes();
|
||||||
|
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int SDL_GL_GetAttribute(
|
public static extern int SDL_GL_GetAttribute(
|
||||||
SDL_GLattr attr,
|
SDL_GLattr attr,
|
||||||
@ -3072,6 +3090,10 @@ namespace SDL2
|
|||||||
/* Drag and drop events */
|
/* Drag and drop events */
|
||||||
SDL_DROPFILE = 0x1000,
|
SDL_DROPFILE = 0x1000,
|
||||||
|
|
||||||
|
/* Render events */
|
||||||
|
/* Only available in SDL 2.0.2 or higher */
|
||||||
|
SDL_RENDER_TARGETS_RESET = 0x2000,
|
||||||
|
|
||||||
/* Events SDL_USEREVENT through SDL_LASTEVENT are for
|
/* Events SDL_USEREVENT through SDL_LASTEVENT are for
|
||||||
* your use, and should be allocated with
|
* your use, and should be allocated with
|
||||||
* SDL_RegisterEvents()
|
* SDL_RegisterEvents()
|
||||||
@ -4610,7 +4632,19 @@ namespace SDL2
|
|||||||
string mappingString
|
string mappingString
|
||||||
);
|
);
|
||||||
|
|
||||||
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerMappingForGUID", CallingConvention = CallingConvention.Cdecl)]
|
/* THIS IS AN RWops FUNCTION! */
|
||||||
|
[DllImport(nativeLibName, EntryPoint = "SDL_GameControllerAddMappingsFromRW", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
private static extern int INTERNAL_SDL_GameControllerAddMappingsFromRW(
|
||||||
|
IntPtr rw,
|
||||||
|
int freerw
|
||||||
|
);
|
||||||
|
public static int SDL_GameControllerAddMappingsFromFile(string file)
|
||||||
|
{
|
||||||
|
IntPtr rwops = INTERNAL_SDL_RWFromFile(file, "rb");
|
||||||
|
return INTERNAL_SDL_GameControllerAddMappingsFromRW(rwops, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
[return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler), MarshalCookie = LPUtf8StrMarshaler.LeaveAllocated)]
|
[return : MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler), MarshalCookie = LPUtf8StrMarshaler.LeaveAllocated)]
|
||||||
public static extern string SDL_GameControllerMappingForGUID(
|
public static extern string SDL_GameControllerMappingForGUID(
|
||||||
SDL_JoystickGUID guid
|
SDL_JoystickGUID guid
|
||||||
@ -5472,6 +5506,13 @@ namespace SDL2
|
|||||||
|
|
||||||
#region SDL_cpuinfo.h
|
#region SDL_cpuinfo.h
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This function returns the number of CPU cores available.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The number of CPU cores available.</returns>
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int SDL_GetCPUCount();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This function returns the amount of RAM configured in the system, in MB.
|
/// This function returns the amount of RAM configured in the system, in MB.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user