mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 23:57:22 +02:00
Add return values to example
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
This commit is contained in:
parent
e3c24f34f1
commit
695f7e565f
@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "gamemode_client.h"
|
#include "gamemode_client.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
@ -39,6 +40,7 @@ int main(void)
|
|||||||
/* Request we start game mode */
|
/* Request we start game mode */
|
||||||
if (gamemode_request_start() != 0) {
|
if (gamemode_request_start() != 0) {
|
||||||
fprintf(stderr, "Failed to request gamemode start: %s...\n", gamemode_error_string());
|
fprintf(stderr, "Failed to request gamemode start: %s...\n", gamemode_error_string());
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Simulate running a game */
|
/* Simulate running a game */
|
||||||
@ -47,5 +49,8 @@ int main(void)
|
|||||||
/* Request we end game mode (optional) */
|
/* Request we end game mode (optional) */
|
||||||
if (gamemode_request_end() != 0) {
|
if (gamemode_request_end() != 0) {
|
||||||
fprintf(stderr, "Failed to request gamemode end: %s...\n", gamemode_error_string());
|
fprintf(stderr, "Failed to request gamemode end: %s...\n", gamemode_error_string());
|
||||||
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user