Esempio n. 1
0
        public bool Set(string value, HintPriority priority)
        {
            Span <byte> b = stackalloc byte[SL(value)];

            StringToUTF8(value, b);

            fixed(byte *v = b)
            fixed(byte *n = buf.Span)
            return(SDL_SetHintWithPriority(n, v, priority) == SDL_Bool.True);
        }
Esempio n. 2
0
 public static bool SetHintWithPriority(
     string name,
     string value,
     HintPriority priority
     )
 {
     return(INTERNAL_SetHintWithPriority(
                UTF8_ToNative(name),
                UTF8_ToNative(value),
                priority
                ));
 }
Esempio n. 3
0
 public static extern SDL_Bool SDL_SetHintWithPriority(
     /* const char*/ byte *name,
     /* const char*/ byte *value,
     HintPriority priority
     );
Esempio n. 4
0
 /// <summary>
 /// Sets the hint's valud.
 /// </summary>
 /// <param name="value">The value to set.</param>
 /// <param name="priority">The priority of the value.</param>
 /// <returns><c>true</c> if the hint was set, <c>false</c> otherwise.</returns>
 public bool Set(string value, HintPriority priority) =>
 Native.SDL_SetHintWithPriority(_name, value, priority);
Esempio n. 5
0
 private static extern bool INTERNAL_SetHintWithPriority(
     byte[] name,
     byte[] value,
     HintPriority priority
     );