Skip to content

Commit 6b5ddae

Browse files
authored
Release preparation - Add a gif, and a few minor code fixes (#12)
1 parent 2028dde commit 6b5ddae

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,5 +524,3 @@ MigrationBackup/
524524

525525
# End of https://www.toptal.com/developers/gitignore/api/c++,visualstudio,python
526526
Client/imgui.ini
527-
Client/Fonts/CascadiaCodeFont.cpp
528-
Client/Fonts/CascadiaCodeFont.h

Client/GUI_Impls/CrossPlatformGUI.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ bool CrossPlatformGUI::performGUIPass()
1717

1818
//Legal disclaimer
1919
ImGui::Text("! This product is not affiliated with Sony. Use at your own risk. !");
20+
ImGui::Text("Source: https://github.com/Plutoberth/SonyHeadphonesClient");
21+
ImGui::Spacing();
2022

2123
this->_drawErrors();
2224
this->_drawDeviceDiscovery();
@@ -58,9 +60,10 @@ void CrossPlatformGUI::_drawDeviceDiscovery()
5860

5961
if (this->_bt.isConnected())
6062
{
61-
ImGui::Text("Connected to %s (%s)", this->_connectedDevice.name.c_str(), this->_connectedDevice.mac.c_str());
63+
ImGui::Text("Connected to %s", this->_connectedDevice.name.c_str());
6264
if (ImGui::Button("Disconnect"))
6365
{
66+
selectedDevice = -1;
6467
this->_bt.disconnect();
6568
}
6669
}
@@ -71,8 +74,7 @@ void CrossPlatformGUI::_drawDeviceDiscovery()
7174
int temp = 0;
7275
for (auto device : connectedDevices)
7376
{
74-
auto name = device.name + " (" + device.mac + ")";
75-
ImGui::RadioButton(name.c_str(), &selectedDevice, temp++);
77+
ImGui::RadioButton(device.name.c_str(), &selectedDevice, temp++);
7678
}
7779

7880
ImGui::Spacing();

Client/GUI_Impls/WindowsGUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void EnterGUIMainLoop(BluetoothWrapper bt)
2323
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WindowsGUIInternal::WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, APP_NAME_W, NULL };
2424
::RegisterClassEx(&wc);
2525
//TODO: pass window data (size, name, etc) as params and autoscale
26-
HWND hwnd = ::CreateWindowW(wc.lpszClassName, APP_NAME_W, WS_OVERLAPPEDWINDOW, 100, 100, 555, 360, NULL, NULL, wc.hInstance, NULL);
26+
HWND hwnd = ::CreateWindowW(wc.lpszClassName, APP_NAME_W, WS_OVERLAPPEDWINDOW, 100, 100, 540, 335, NULL, NULL, wc.hInstance, NULL);
2727

2828
// Initialize Direct3D
2929
if (!WindowsGUIInternal::CreateDeviceD3D(hwnd))

Client/WindowsBluetoothConnector.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ std::vector<BluetoothDevice> WindowsBluetoothConnector::findDevicesInRadio(BLUET
197197

198198
// For each radio, get the first device
199199
dev_find_handle = BluetoothFindFirstDevice(search_params, &device_info);
200-
//TODO: This fails if there aren't any devices, check the conditions and return an empty vector
201200

202201
if (!dev_find_handle)
203202
{
@@ -210,7 +209,6 @@ std::vector<BluetoothDevice> WindowsBluetoothConnector::findDevicesInRadio(BLUET
210209
{
211210
throw std::runtime_error("BluetoothFindFirstDevice() failed with error code: " + std::to_string(GetLastError()));
212211
}
213-
214212
}
215213

216214
// Get the device info

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</p>
1616
</p>
1717

18-
18+
![Program Showcase](https://github.com/Plutoberth/SonyHeadphonesClient/blob/master/static/showcase.gif)
1919

2020
<!-- TABLE OF CONTENTS -->
2121
## Table of Contents
@@ -34,9 +34,11 @@
3434
### THIS PROGRAM IS NOT AFFILIATED IN ANY WAY, SHAPE, OR FORM WITH THE SONY CORPORATION.
3535
### YOU ARE RESPONSIBLE FOR ANY DAMAGE THAT MAY OCCUR WHILE USING THIS PROGRAM.
3636

37+
38+
3739
## Motivation
3840

39-
I recently bought the WH-1000-XM3s, and I was frustrated that I couldn't change their settings while using my PC.
41+
I recently bought the WH-1000-XM3s, and I was annoyed by the fact that I couldn't change their settings while using my PC.
4042
So I reverse-engineered the application (for intercompatibility purposes, of course), defined the protocol, and created with an alternative application with [Mr-M33533K5](https://github.com/Mr-M33533K5]).
4143

4244
## Features

static/showcase.gif

56.5 KB
Loading

static/showcase.webm

367 KB
Binary file not shown.

0 commit comments

Comments
 (0)