Skip to content

Commit 669fd8f

Browse files
committed
Added steering and wheel slip
Added steering in status bar and wheel slip in table; upgraded from Visual Studio 2013 to 2017; new release version 1.2.1.
1 parent 48e807a commit 669fd8f

11 files changed

+159
-177
lines changed

Helper.cpp

+8-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ BOOL FormatTime(LPTSTR lpszTime, SIZE_T cchStringLen, int nTime)
1313
return FALSE;
1414

1515
if (nTime <= 0)
16-
_tcsncpy(lpszTime, TEXT("0:00.000"), cchStringLen);
16+
lstrcpyn(lpszTime, TEXT("0:00.000"), (int)cchStringLen);
1717
else if (nTime < 3600000)
1818
{
1919
UINT uMinute = (nTime / 60000);
@@ -54,7 +54,7 @@ BOOL GetFileName(HWND hWnd, LPTSTR lpszFileName, SIZE_T cchStringLen, LPDWORD lp
5454
TCHAR* pszInitialDir = szInitialDir;
5555
if (lpszFileName[0] != TEXT('\0'))
5656
{
57-
_tcsncpy(pszInitialDir, lpszFileName, _countof(szInitialDir));
57+
lstrcpyn(pszInitialDir, lpszFileName, _countof(szInitialDir));
5858
TCHAR* token = _tcsrchr(pszInitialDir, TEXT('\\'));
5959
if (token != NULL)
6060
pszInitialDir[token - szInitialDir] = TEXT('\0');
@@ -69,9 +69,9 @@ BOOL GetFileName(HWND hWnd, LPTSTR lpszFileName, SIZE_T cchStringLen, LPDWORD lp
6969
if (bSave)
7070
{
7171
if (lpszFileName[0] != TEXT('\0'))
72-
_tcsncpy(szFile, lpszFileName, _countof(szFile));
72+
lstrcpyn(szFile, lpszFileName, _countof(szFile));
7373
else
74-
_tcsncpy(szFile, TEXT("*"), _countof(szFile));
74+
lstrcpyn(szFile, TEXT("*"), _countof(szFile));
7575
TCHAR* token = _tcsrchr(szFile, TEXT('.'));
7676
if (token != NULL)
7777
szFile[token - szFile] = TEXT('\0');
@@ -111,7 +111,7 @@ BOOL GetFileName(HWND hWnd, LPTSTR lpszFileName, SIZE_T cchStringLen, LPDWORD lp
111111

112112
if (bRet)
113113
{
114-
_tcsncpy(lpszFileName, szFile, cchStringLen);
114+
lstrcpyn(lpszFileName, szFile, (int)cchStringLen);
115115
*lpdwFilterIndex = of.nFilterIndex;
116116
}
117117

@@ -126,7 +126,7 @@ BOOL StatusBar_SetText(HWND hwndCtl, UINT uIndexType, LPCTSTR lpszText, BOOL bCe
126126
if (hwndCtl == NULL)
127127
return FALSE;
128128

129-
// Set ToolTip
129+
// Set tooltip
130130
SendMessage(hwndCtl, SB_SETTIPTEXT, (WPARAM)LOBYTE(LOWORD(uIndexType)), (LPARAM)lpszText);
131131

132132
if (!bCenter)
@@ -413,6 +413,7 @@ int ListView_AddRaceText(HWND hwndCtl, int nRaceNumber, int nColumnWidth, LPCTST
413413
// If necessary, rename the header if the application
414414
// was started while a race was already in progress
415415
TCHAR szHeading[MAX_CONTROLTEXT];
416+
szHeading[0] = TEXT('\0');
416417

417418
LV_COLUMN col = { 0 };
418419
col.mask = LVCF_TEXT;
@@ -533,6 +534,7 @@ BOOL ListView_DeleteAllRaces(HWND hwndCtl)
533534
BOOL ListView_SaveAllItems(HWND hwndCtl, LPTSTR lpszFileName, BOOL bSaveAsCsv)
534535
{
535536
TCHAR szText[MAX_CONTROLTEXT];
537+
szText[0] = TEXT('\0');
536538

537539
if (hwndCtl == NULL)
538540
return FALSE;

Helper.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ const TCHAR szSpeedKmh[] = TEXT("%d km/h");
2929
const TCHAR szSpeedMph[] = TEXT("%d mph");
3030
const TCHAR szEngineRpm[] = TEXT("%.0f rpm");
3131
const TCHAR szEngineCurGear[] = TEXT("Gear: %d");
32-
const TCHAR szGasPedal[] = TEXT("Throttle: %3.0f%%");
33-
const TCHAR szRumbleIntensity[] = TEXT("Rumble: %3.0f%%");
32+
const TCHAR szSteering[] = TEXT("Steering: %3.0f %%");
33+
const TCHAR szGasPedal[] = TEXT("Throttle: %3.0f %%");
34+
const TCHAR szRumbleIntensity[] = TEXT("Rumble: %3.0f %%");
3435
const TCHAR szBraking[] = TEXT("Braking");
3536

3637
// List-view headings
@@ -49,6 +50,7 @@ const TCHAR szRumbles[] = TEXT("Rumbles");
4950
const TCHAR szGearchanges[] = TEXT("Gearchanges");
5051
const TCHAR szBrakesUsed[] = TEXT("Brakes Used");
5152
const TCHAR szFullspeed[] = TEXT("Fullspeed");
53+
const TCHAR szWheelSlip[] = TEXT("Wheel Slip");
5254

5355
// General functions
5456
BOOL FormatTime(LPTSTR lpszTime, SIZE_T cchStringLen, int nTime);

Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ The application does not log any data or perform any analyses. Also no gauges or
1010

1111
The source code is provided as an example and should show how to access the game data via the [telemetry interface](https://wiki.xaseco.org/wiki/Telemetry_interface) of [Maniaplanet 4](https://www.maniaplanet.com/) or [Trackmania Turbo](https://www.ubisoft.com/en-gb/game/trackmania-turbo/).
1212

13-
It's a generic C/C++ Win32 desktop project created with Visual Studio 2013. Since no external libraries are used, the project should be built without problems. An older VS2005 project file (.vcproj) and two Visual Studio Installer projects for x86 and x64 are also included.
13+
This is a generic C/C++ Win32 desktop project created with Visual Studio 2017. Since no external libraries are used, the project should be built without problems. An older VS2005 project file (.vcproj) and two Visual Studio Installer projects for x86 and x64 are also included.

Resource.h

184 Bytes
Binary file not shown.

Setup/Setup.vdproj

+7-69
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@
1313
"SccProvider" = "8:"
1414
"Hierarchy"
1515
{
16-
"Entry"
17-
{
18-
"MsmKey" = "8:_4CC65BCBC5E4BCEFC5CD50D2515A9741"
19-
"OwnerKey" = "8:_E3461C036BF947D88556F74EC33D8DD0"
20-
"MsmSig" = "8:_UNDEFINED"
21-
}
22-
"Entry"
23-
{
24-
"MsmKey" = "8:_5A4B9DAFE9768CBB38DC6AFA6DEF49E9"
25-
"OwnerKey" = "8:_E3461C036BF947D88556F74EC33D8DD0"
26-
"MsmSig" = "8:_UNDEFINED"
27-
}
2816
"Entry"
2917
{
3018
"MsmKey" = "8:_E3461C036BF947D88556F74EC33D8DD0"
@@ -58,11 +46,6 @@
5846
"ComponentsUrl" = "8:"
5947
"Items"
6048
{
61-
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.4.5"
62-
{
63-
"Name" = "8:Windows Installer 4.5"
64-
"ProductCode" = "8:Microsoft.Windows.Installer.4.5"
65-
}
6649
}
6750
}
6851
}
@@ -90,11 +73,6 @@
9073
"ComponentsUrl" = "8:"
9174
"Items"
9275
{
93-
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.4.5"
94-
{
95-
"Name" = "8:Windows Installer 4.5"
96-
"ProductCode" = "8:Microsoft.Windows.Installer.4.5"
97-
}
9876
}
9977
}
10078
}
@@ -118,46 +96,6 @@
11896
}
11997
"File"
12098
{
121-
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4CC65BCBC5E4BCEFC5CD50D2515A9741"
122-
{
123-
"SourcePath" = "8:UxTheme.dll"
124-
"TargetName" = "8:UxTheme.dll"
125-
"Tag" = "8:"
126-
"Folder" = "8:_41029E7D8E6B4E77BA5BF125181A456D"
127-
"Condition" = "8:"
128-
"Transitive" = "11:FALSE"
129-
"Vital" = "11:TRUE"
130-
"ReadOnly" = "11:FALSE"
131-
"Hidden" = "11:FALSE"
132-
"System" = "11:FALSE"
133-
"Permanent" = "11:FALSE"
134-
"SharedLegacy" = "11:FALSE"
135-
"PackageAs" = "3:1"
136-
"Register" = "3:4"
137-
"Exclude" = "11:TRUE"
138-
"IsDependency" = "11:TRUE"
139-
"IsolateTo" = "8:"
140-
}
141-
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_5A4B9DAFE9768CBB38DC6AFA6DEF49E9"
142-
{
143-
"SourcePath" = "8:COMDLG32.dll"
144-
"TargetName" = "8:COMDLG32.dll"
145-
"Tag" = "8:"
146-
"Folder" = "8:_41029E7D8E6B4E77BA5BF125181A456D"
147-
"Condition" = "8:"
148-
"Transitive" = "11:FALSE"
149-
"Vital" = "11:TRUE"
150-
"ReadOnly" = "11:FALSE"
151-
"Hidden" = "11:FALSE"
152-
"System" = "11:FALSE"
153-
"Permanent" = "11:FALSE"
154-
"SharedLegacy" = "11:FALSE"
155-
"PackageAs" = "3:1"
156-
"Register" = "3:1"
157-
"Exclude" = "11:TRUE"
158-
"IsDependency" = "11:TRUE"
159-
"IsolateTo" = "8:"
160-
}
16199
}
162100
"FileType"
163101
{
@@ -221,23 +159,23 @@
221159
{
222160
"Name" = "8:Microsoft Visual Studio"
223161
"ProductName" = "8:Telemetry Monitor"
224-
"ProductCode" = "8:{04AB3FA0-7088-4EDC-AAB7-EC6D4A8255BE}"
225-
"PackageCode" = "8:{026F0220-A0B9-43CC-B2D2-C638FB00272B}"
162+
"ProductCode" = "8:{00160BFD-98BE-428E-AB3F-7EF3307A79CB}"
163+
"PackageCode" = "8:{AB572D2F-0CB2-4142-B095-426F98383122}"
226164
"UpgradeCode" = "8:{0059BDD4-CAF2-4273-B4E2-4446D5CA3E27}"
227165
"AspNetVersion" = "8:4.0.30319.0"
228166
"RestartWWWService" = "11:FALSE"
229167
"RemovePreviousVersions" = "11:TRUE"
230168
"DetectNewerInstalledVersion" = "11:TRUE"
231169
"InstallAllUsers" = "11:FALSE"
232-
"ProductVersion" = "8:1.2.0"
170+
"ProductVersion" = "8:1.2.1"
233171
"Manufacturer" = "8:Electron"
234172
"ARPHELPTELEPHONE" = "8:"
235173
"ARPHELPLINK" = "8:http://www.wolfgang-rolke.de/gbxdump/"
236174
"Title" = "8:Telemetry Monitor (x86)"
237175
"Subject" = "8:TrackMania Telemetry Monitor (32-bit)"
238176
"ARPCONTACT" = "8:Electron"
239177
"Keywords" = "8:Installer,MSI,TMTelemetry,x86"
240-
"ARPCOMMENTS" = "8:Copyright (c) 2017, 2018 by Electron"
178+
"ARPCOMMENTS" = "8:Copyright (c) 2017-2019 by Electron"
241179
"ARPURLINFOABOUT" = "8:http://www.wolfgang-rolke.de/gbxdump/"
242180
"ARPPRODUCTICON" = "8:_E3461C036BF947D88556F74EC33D8DD0"
243181
"ARPIconIndex" = "3:102"
@@ -324,7 +262,7 @@
324262
"Condition" = "8:"
325263
"Transitive" = "11:FALSE"
326264
"ValueTypes" = "3:3"
327-
"Value" = "3:16352"
265+
"Value" = "3:32736"
328266
}
329267
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_7BCC539048DF4342AFC4C44B25DD3DE9"
330268
{
@@ -505,7 +443,7 @@
505443
"ContextData" = "8:"
506444
"Attributes" = "3:0"
507445
"Setting" = "3:2"
508-
"Value" = "8:TrackMania Telemetry Monitor, Copyright © 2017, 2018 by Electron"
446+
"Value" = "8:TrackMania Telemetry Monitor, Copyright © 2017-2019 by Electron"
509447
"DefaultValue" = "8:#1202"
510448
"UsePlugInResources" = "11:TRUE"
511449
}
@@ -766,7 +704,7 @@
766704
"ContextData" = "8:"
767705
"Attributes" = "3:0"
768706
"Setting" = "3:2"
769-
"Value" = "8:TrackMania Telemetry Monitor, Copyright © 2017, 2018 by Electron"
707+
"Value" = "8:TrackMania Telemetry Monitor, Copyright © 2017-2019 by Electron"
770708
"DefaultValue" = "8:#1202"
771709
"UsePlugInResources" = "11:TRUE"
772710
}

0 commit comments

Comments
 (0)