Video display modes: Difference between revisions

m
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">/* video_display_modesVideo_display_modes.wren */
 
class C {
Line 1,034:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">#include/* <stdiogcc Video_display_modes.h>c -o Video_display_modes -lwren -lm */
 
 
#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 = "video_display_modesVideo_display_modes.wren";
char *script = readFile(fileName);
wrenInterpret(vm, module, script);
9,482

edits