Skip to content

Commit

Permalink
Release preparation - Add a gif, and a few minor code fixes (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Plutoberth authored Aug 15, 2020
1 parent 2028dde commit 6b5ddae
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -524,5 +524,3 @@ MigrationBackup/

# End of https://www.toptal.com/developers/gitignore/api/c++,visualstudio,python
Client/imgui.ini
Client/Fonts/CascadiaCodeFont.cpp
Client/Fonts/CascadiaCodeFont.h
8 changes: 5 additions & 3 deletions Client/GUI_Impls/CrossPlatformGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ bool CrossPlatformGUI::performGUIPass()

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

this->_drawErrors();
this->_drawDeviceDiscovery();
Expand Down Expand Up @@ -58,9 +60,10 @@ void CrossPlatformGUI::_drawDeviceDiscovery()

if (this->_bt.isConnected())
{
ImGui::Text("Connected to %s (%s)", this->_connectedDevice.name.c_str(), this->_connectedDevice.mac.c_str());
ImGui::Text("Connected to %s", this->_connectedDevice.name.c_str());
if (ImGui::Button("Disconnect"))
{
selectedDevice = -1;
this->_bt.disconnect();
}
}
Expand All @@ -71,8 +74,7 @@ void CrossPlatformGUI::_drawDeviceDiscovery()
int temp = 0;
for (auto device : connectedDevices)
{
auto name = device.name + " (" + device.mac + ")";
ImGui::RadioButton(name.c_str(), &selectedDevice, temp++);
ImGui::RadioButton(device.name.c_str(), &selectedDevice, temp++);
}

ImGui::Spacing();
Expand Down
2 changes: 1 addition & 1 deletion Client/GUI_Impls/WindowsGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void EnterGUIMainLoop(BluetoothWrapper bt)
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WindowsGUIInternal::WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, APP_NAME_W, NULL };
::RegisterClassEx(&wc);
//TODO: pass window data (size, name, etc) as params and autoscale
HWND hwnd = ::CreateWindowW(wc.lpszClassName, APP_NAME_W, WS_OVERLAPPEDWINDOW, 100, 100, 555, 360, NULL, NULL, wc.hInstance, NULL);
HWND hwnd = ::CreateWindowW(wc.lpszClassName, APP_NAME_W, WS_OVERLAPPEDWINDOW, 100, 100, 540, 335, NULL, NULL, wc.hInstance, NULL);

// Initialize Direct3D
if (!WindowsGUIInternal::CreateDeviceD3D(hwnd))
Expand Down
2 changes: 0 additions & 2 deletions Client/WindowsBluetoothConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ std::vector<BluetoothDevice> WindowsBluetoothConnector::findDevicesInRadio(BLUET

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

if (!dev_find_handle)
{
Expand All @@ -210,7 +209,6 @@ std::vector<BluetoothDevice> WindowsBluetoothConnector::findDevicesInRadio(BLUET
{
throw std::runtime_error("BluetoothFindFirstDevice() failed with error code: " + std::to_string(GetLastError()));
}

}

// Get the device info
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</p>
</p>


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

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



## Motivation

I recently bought the WH-1000-XM3s, and I was frustrated that I couldn't change their settings while using my PC.
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.
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]).

## Features
Expand Down
Binary file added static/showcase.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/showcase.webm
Binary file not shown.

0 comments on commit 6b5ddae

Please sign in to comment.