Fix test_console
Correctly set locale on startup and sleep for one second after each redraw to reduce CPU consumption. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
7149b5dd37
commit
e5de20a22a
@ -23,6 +23,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
@ -60,6 +61,7 @@ static int map_outputs(struct kmscon_compositor *comp,
|
||||
iter, ret);
|
||||
continue;
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -127,6 +129,8 @@ int main(int argc, char **argv)
|
||||
struct kmscon_compositor *comp;
|
||||
int ret;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
ret = kmscon_compositor_new(&comp);
|
||||
if (ret) {
|
||||
printf("Cannot create compositor: %d\n", ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user