-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6fb8266
commit a67d56b
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
**/Deployment/MultiWindow | ||
compile_commands.json | ||
.vscode/** | ||
**/Deployment/** | ||
!**/Deployment/keepme* |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#include "kinc/string.h" | ||
#include <kinc/display.h> | ||
#include <kinc/log.h> | ||
|
||
void print_mode(const char *indent, kinc_display_mode_t mode) { | ||
kinc_log(KINC_LOG_LEVEL_INFO, "%sx: %i", indent, mode.x); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "%sy: %i", indent, mode.y); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "%swidth: %i", indent, mode.width); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "%sheight: %i", indent, mode.height); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "%spixels_per_inch: %i", indent, mode.pixels_per_inch); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "%sfrequency: %i", indent, mode.frequency); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "%sbits_per_pixel: %i", indent, mode.bits_per_pixel); | ||
} | ||
|
||
int kickstart(int argc, char **argv) { | ||
bool print_modes = false; | ||
if (argc > 1 && kinc_string_compare(argv[1], "--print-modes") == 0) { | ||
print_modes = true; | ||
} | ||
kinc_display_init(); | ||
int count = kinc_count_displays(); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "display count: %i", count); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "primary display: %i", kinc_primary_display()); | ||
for (int i = 0; i < count; i++) { | ||
bool available = kinc_display_available(i); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "display %i:", i); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "\tavailable: %s", available ? "true" : "false"); | ||
if (available) { | ||
kinc_log(KINC_LOG_LEVEL_INFO, "\tname: %s", kinc_display_name(i)); | ||
kinc_display_mode_t mode = kinc_display_current_mode(i); | ||
print_mode("\t", mode); | ||
kinc_log(KINC_LOG_LEVEL_INFO, ""); | ||
int mode_count = kinc_display_count_available_modes(i); | ||
kinc_log(KINC_LOG_LEVEL_INFO, "\tavailable modes: %i", mode_count); | ||
if (print_modes) { | ||
for (int j = 0; j < mode_count; j++) { | ||
kinc_display_mode_t mode = kinc_display_available_mode(i, j); | ||
print_mode("\t\t", mode); | ||
kinc_log(KINC_LOG_LEVEL_INFO, ""); | ||
} | ||
} | ||
} | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const project = new Project('DisplayTest'); | ||
|
||
await project.addProject('../../'); | ||
|
||
project.addFile('Sources/**'); | ||
project.setDebugDir('Deployment'); | ||
|
||
project.flatten(); | ||
|
||
resolve(project); |