MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / get_args

Function get_args

components/windows/src/context.cpp:64–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64inline std::vector<std::string> get_args()
65{
66 LPWSTR *argv;
67 int argc;
68
69 argv = CommandLineToArgvW(GetCommandLineW(), &argc);
70
71 // Ignore the first argument containing the application full path
72 std::vector<std::wstring> arg_strings(argv + 1, argv + argc);
73 std::vector<std::string> args;
74
75 for (auto &arg : arg_strings)
76 {
77 args.push_back(wstr_to_str(arg));
78 }
79
80 return args;
81}
82
83WindowsPlatformContext::WindowsPlatformContext(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow) :
84 PlatformContext{}

Callers 1

Calls 1

wstr_to_strFunction · 0.85

Tested by

no test coverage detected