Video display modes: Difference between revisions
m
→{{header|Wren}}: Minor tidy
m (→{{header|Wren}}: Minor tidy) |
|||
Line 1,010:
=={{header|Wren}}==
The ability to call external processes such as ''xrandr'' is expected to be added to Wren-cli in the next release. In the meantime, we embed the following Wren script in a minimal C host (no error checking) to complete this task.
<syntaxhighlight lang="ecmascript">/*
class C {
Line 1,034:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Line 1,091 ⟶ 1,094:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
wrenInterpret(vm, module, script);
|