Skip to content
Extraits de code Groupes Projets

Resolve "SDL2 module"

Fusionnées Kubat a demandé de fusionner sdl2 vers master
1 file
+ 3
22
Comparer les modifications
  • Côte à côte
  • En ligne
+ 3
22
@@ -116,25 +116,6 @@ error:
return NULL;
}
int
lmpv_is_paused(mpv_handle *ctx, int *ret)
{
int status;
if (!ctx) {
fprintf(stderr, " ! lmpv_is_paused: failed due to missing mpv ctx\n");
return 1;
}
if ((status = mpv_get_property(ctx, "pause", MPV_FORMAT_FLAG, ret)) < 0) {
fprintf(stderr, "lmpv_is_paused: Failed to get pause property: %s\n",
mpv_error_string(status));
return 1;
}
return 0;
}
int
lmpv_set_volume(mpv_handle *ctx, int vol)
{
@@ -149,7 +130,7 @@ lmpv_set_volume(mpv_handle *ctx, int vol)
snprintf(str, 4, "%d", vol);
const char *cmd[] = {"set", "ao-volume", str, NULL};
if ((status = mpv_command(ctx, cmd)) < 0) {
if ((status = mpv_command_async(ctx, 0, cmd)) < 0) {
fprintf(stderr, " ! lmpv_set_volume: Failed to execute command: %s\n",
mpv_error_string(status));
return 1;
@@ -173,7 +154,7 @@ lmpv_load_file(mpv_handle *ctx, const char *file)
const char *cmd[] = {"loadfile", file, "replace", NULL};
int status;
if ((status = mpv_command(ctx, cmd)) < 0) {
if ((status = mpv_command_async(ctx, 0, cmd)) < 0) {
fprintf(stderr, " ! lmpv_load_file: Failed to add '%s': %s\n",
file, mpv_error_string(status));
return 1;
@@ -192,7 +173,7 @@ lmpv_toggle_pause(mpv_handle *ctx)
const char *cmd[] = {"cycle", "pause", "up", NULL};
int status;
if ((status = mpv_command(ctx, cmd)) < 0) {
if ((status = mpv_command_async(ctx, 0, cmd)) < 0) {
fprintf(stderr, "lmpv_toggle_pause: Failed issue command: %s\n",
mpv_error_string(status));
return 1;
Chargement en cours