1. Joseph Bane
  2. FFS Pixmap visualization client

Commits

Sherief N. Farouk  committed 13b0152

Command line parameter usage.

  • Participants
  • Parent commits 7cc86f2
  • Branches default

Comments (0)

Files changed (1)

File pixmap_viz_client.cpp

View file
  • Ignore whitespace
 
 int main(int argc, char* argv[])
 {
-    cout << "Use the right mouse button to bring up the options menu.\n";
-    cout << "Press Q to quit.\n";
+    if(argc != 2)
+    {
+        cout << "Usage: " << argv[0] << " <target ip>\n";
+        return 1;
+    }
     //
+    cout << "Initializing networking...\n";
     client_initialize();
-    client_info Info = handshake("127.0.0.1");
+    cout << "Doing handshake...\n";
+    client_info Info = handshake(argv[1]);
+    cout << "Handshake done.\n";
     application::ScreenWidth = Info.width;
     application::ScreenHeight = Info.height;
     PixmapData = new unsigned char [Info.width * Info.height * 4];