screen_info: Create BApplication to use BScreen

* BScreen uses AppServerLink, thanks PulkoMandy!
This commit is contained in:
Alexander von Gluck IV
2014-08-19 13:28:54 -04:00
parent be84a96144
commit febaef90ec
+4
View File
@@ -7,6 +7,7 @@
*/ */
#include <Application.h>
#include <Screen.h> #include <Screen.h>
#include <stdio.h> #include <stdio.h>
@@ -19,6 +20,9 @@
int int
main() main()
{ {
// BScreen usage requires BApplication for AppServerLink
BApplication app("application/x-vnd.Haiku-screen_info");
for (int id = 0; id < MAX_SCREENS; id++) { for (int id = 0; id < MAX_SCREENS; id++) {
screen_id screenIndex = {id}; screen_id screenIndex = {id};
BScreen screen(screenIndex); BScreen screen(screenIndex);