[vlc-commits] Atmo: port Win32 code to UNICODE friendly APIs
Jean-Baptiste Kempf
git at videolan.org
Tue Jan 15 00:34:42 CET 2013
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan 15 00:13:34 2013 +0100| [59f746f6737ae3b47db6dafa53ee0e0b473b0de9] | committer: Jean-Baptiste Kempf
Atmo: port Win32 code to UNICODE friendly APIs
This needs testing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=59f746f6737ae3b47db6dafa53ee0e0b473b0de9
---
modules/video_filter/atmo/AtmoClassicConnection.cpp | 2 +-
modules/video_filter/atmo/AtmoDmxSerialConnection.cpp | 2 +-
modules/video_filter/atmo/AtmoMultiConnection.cpp | 2 +-
modules/video_filter/atmo/FnordlichtConnection.cpp | 2 +-
modules/video_filter/atmo/MoMoConnection.cpp | 2 +-
modules/video_filter/atmo/atmo.cpp | 9 +++++----
6 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/modules/video_filter/atmo/AtmoClassicConnection.cpp b/modules/video_filter/atmo/AtmoClassicConnection.cpp
index baba76f..eb34582 100644
--- a/modules/video_filter/atmo/AtmoClassicConnection.cpp
+++ b/modules/video_filter/atmo/AtmoClassicConnection.cpp
@@ -54,7 +54,7 @@ ATMO_BOOL CAtmoClassicConnection::OpenConnection() {
#if defined(WIN32)
- m_hComport = CreateFile(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(m_hComport == INVALID_HANDLE_VALUE) {
// we have a problem here can't open com port... somebody else may use it?
// m_dwLastWin32Error = GetLastError();
diff --git a/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp b/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp
index 51156a2..b1bbb77 100644
--- a/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp
+++ b/modules/video_filter/atmo/AtmoDmxSerialConnection.cpp
@@ -69,7 +69,7 @@ ATMO_BOOL CAtmoDmxSerialConnection::OpenConnection() {
#if defined(WIN32)
- m_hComport = CreateFile(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(m_hComport == INVALID_HANDLE_VALUE) {
// we have a problem here can't open com port... somebody else may use it?
// m_dwLastWin32Error = GetLastError();
diff --git a/modules/video_filter/atmo/AtmoMultiConnection.cpp b/modules/video_filter/atmo/AtmoMultiConnection.cpp
index 01d1552..4da3bb3 100644
--- a/modules/video_filter/atmo/AtmoMultiConnection.cpp
+++ b/modules/video_filter/atmo/AtmoMultiConnection.cpp
@@ -50,7 +50,7 @@ HANDLE CAtmoMultiConnection::OpenDevice(char *devName)
#endif
#if defined(WIN32)
- hComport = CreateFile(devName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ hComport = CreateFileA(devName, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(hComport == INVALID_HANDLE_VALUE) {
#if !defined(_ATMO_VLC_PLUGIN_)
m_dwLastWin32Error = GetLastError();
diff --git a/modules/video_filter/atmo/FnordlichtConnection.cpp b/modules/video_filter/atmo/FnordlichtConnection.cpp
index 92d6c2d..8c670fc 100644
--- a/modules/video_filter/atmo/FnordlichtConnection.cpp
+++ b/modules/video_filter/atmo/FnordlichtConnection.cpp
@@ -73,7 +73,7 @@ ATMO_BOOL CFnordlichtConnection::OpenConnection()
#if defined(WIN32)
- m_hComport = CreateFile(serdevice,
+ m_hComport = CreateFileA(serdevice,
GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, 0, NULL);
if ( m_hComport == INVALID_HANDLE_VALUE )
diff --git a/modules/video_filter/atmo/MoMoConnection.cpp b/modules/video_filter/atmo/MoMoConnection.cpp
index 5cace6d..4bb7199 100644
--- a/modules/video_filter/atmo/MoMoConnection.cpp
+++ b/modules/video_filter/atmo/MoMoConnection.cpp
@@ -54,7 +54,7 @@ ATMO_BOOL CMoMoConnection::OpenConnection() {
#if defined(WIN32)
- m_hComport = CreateFile(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ m_hComport = CreateFileA(serdevice, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if(m_hComport == INVALID_HANDLE_VALUE) {
// we have a problem here can't open com port... somebody else may use it?
// m_dwLastWin32Error = GetLastError();
diff --git a/modules/video_filter/atmo/atmo.cpp b/modules/video_filter/atmo/atmo.cpp
index 78f9129..e430796 100644
--- a/modules/video_filter/atmo/atmo.cpp
+++ b/modules/video_filter/atmo/atmo.cpp
@@ -44,6 +44,7 @@
#include <vlc_playlist.h>
#include <vlc_filter.h>
#include <vlc_atomic.h>
+#include <vlc_charset.h>
#include "filter_picture.h"
@@ -1847,8 +1848,8 @@ static void Atmo_SetupParameters(filter_t *p_filter)
COM Server for AtmoLight not running ?
if the exe path is configured try to start the "userspace" driver
*/
- char *psz_path = var_CreateGetStringCommand( p_filter,
- CFG_PREFIX "atmowinexe" );
+ LPTSTR psz_path = ToT(var_CreateGetStringCommand( p_filter,
+ CFG_PREFIX "atmowinexe" ));
if(psz_path != NULL)
{
STARTUPINFO startupinfo;
@@ -1858,7 +1859,7 @@ static void Atmo_SetupParameters(filter_t *p_filter)
if(CreateProcess(psz_path, NULL, NULL, NULL,
FALSE, 0, NULL, NULL, &startupinfo, &pinfo) == TRUE)
{
- msg_Dbg(p_filter,"launched AtmoWin from %s",psz_path);
+ msg_Dbg(p_filter,"launched AtmoWin from %s", FromT(psz_path));
WaitForInputIdle(pinfo.hProcess, 5000);
/*
retry to initialize the library COM ... functionality
@@ -1866,7 +1867,7 @@ static void Atmo_SetupParameters(filter_t *p_filter)
*/
i = AtmoInitialize(p_filter, false);
} else {
- msg_Err(p_filter,"failed to launch AtmoWin from %s", psz_path);
+ msg_Err(p_filter,"failed to launch AtmoWin from %s", FromT(psz_path));
}
free(psz_path);
}
More information about the vlc-commits
mailing list