VirtualBox

Ignore:
Timestamp:
May 11, 2021 2:05:04 PM (4 years ago)
Author:
vboxsync
Message:

Audio/ValKit: Show logo / version information in VKAT. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r88983 r88984  
    2929*   Header Files                                                                                                                 *
    3030*********************************************************************************************************************************/
     31#include <iprt/buildconfig.h>
    3132#include <iprt/errcore.h>
    3233#include <iprt/initterm.h>
     
    3940#include <iprt/test.h>
    4041
     42#include <package-generated.h>
     43#include "product-generated.h"
     44
     45#include <VBox/version.h>
    4146#include <VBox/vmm/pdmaudioinline.h>
    4247#include <VBox/vmm/pdmaudiohostenuminline.h>
     
    324329    { "PlayTone",   false,         audioTestPlayToneSetup,       audioTestPlayToneExec,      audioTestPlayToneDestroy }
    325330};
     331
     332
     333/**
     334 * Shows the application logo.
     335 *
     336 * @param   pStream             Output stream to show logo on.
     337 */
     338void showLogo(PRTSTREAM pStream)
     339{
     340    static bool s_fLogoShown = false; /* Show logo only once. */
     341
     342    if (!s_fLogoShown)
     343    {
     344        RTStrmPrintf(pStream, VBOX_PRODUCT " VKAT (Validation Kit Audio Test) "
     345                     VBOX_VERSION_STRING " - r%s\n"
     346                     "(C) " VBOX_C_YEAR " " VBOX_VENDOR "\n"
     347                     "All rights reserved.\n\n", RTBldCfgRevisionStr());
     348        s_fLogoShown = true;
     349    }
     350}
    326351
    327352/**
     
    972997        return rc;
    973998
     999    AssertReturn(argc > 0, false);
     1000
    9741001    /* At least the operation mode must be there. */
    9751002    if (argc < 2)
     
    9931020            case 'h':
    9941021            {
     1022                showLogo(g_pStdOut);
    9951023                audioTestUsage(g_pStdOut);
    9961024                return RTEXITCODE_SUCCESS;
     
    10201048    }
    10211049
     1050    showLogo(g_pStdOut);
     1051
    10221052    /* Get operation mode. */
    10231053    const char *pszMode = argv[GetState.iNext++]; /** @todo Also do it busybox-like? */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette