Skip to content

Commit

Permalink
FIX: [droid] remove dependency on posix platform
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Jan 26, 2018
1 parent 5018e57 commit 5e10653
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
1 change: 0 additions & 1 deletion project/cmake/treedata/android/subdirs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ xbmc/filesystem/posix filesystem/posix
xbmc/utils/posix utils_posix
xbmc/windowing/android windowing/android
xbmc/windowing/egl windowing/egl
xbmc/platform/posix posix
xbmc/platform/android android
xbmc/platform/android/activity android_activity
xbmc/platform/android/service android_service
Expand Down
1 change: 1 addition & 0 deletions xbmc/platform/android/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set(SOURCES
MessagePrinter.cpp
android_onload.cpp
)

Expand Down
51 changes: 51 additions & 0 deletions xbmc/platform/android/MessagePrinter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (C) 2005-2015 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with XBMC; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/

#include "platform/MessagePrinter.h"
#include "CompileInfo.h"

#include "platform/android/activity/XBMCApp.h"

void CMessagePrinter::DisplayMessage(const std::string& message)
{
CXBMCApp::android_printf("%s", message.c_str());
}

void CMessagePrinter::DisplayWarning(const std::string& warning)
{
CXBMCApp::android_printf("%s", warning.c_str());
}

void CMessagePrinter::DisplayError(const std::string& error)
{
CXBMCApp::android_printf("%s, error.c_str());
}
void CMessagePrinter::DisplayHelpMessage(const std::vector<std::pair<std::string, std::string>>& help)
{
//very crude implementation, pretty it up when possible
std::string message;
for (const auto& line : help)
{
message.append(line.first + "\t" + line.second + "\n");
}
CXBMCApp::android_printf("%s", message.c_str());
}

0 comments on commit 5e10653

Please sign in to comment.